This commit is contained in:
J. Nick Koston
2025-06-06 12:41:25 +01:00
parent 160e2593cd
commit 858ea16f91

View File

@@ -487,8 +487,13 @@ class APIConnection : public APIServerConnection {
uint32_t timestamp; // When this update was queued
uint16_t message_type; // Message type for overhead calculation
// Default constructor
BatchItem() : entity(nullptr), timestamp(0), message_type(0) {}
// Constructor for creating BatchItem
BatchItem(EntityBase *entity, MessageCreator creator, uint32_t timestamp, uint16_t message_type)
BatchItem(EntityBase *entity,
std::function<EncodedMessage(EntityBase *, APIConnection *, uint32_t, bool)> creator,
uint32_t timestamp, uint16_t message_type)
: entity(entity), creator(std::move(creator)), timestamp(timestamp), message_type(message_type) {}
};