Fixed bug when decoding update messages

This commit is contained in:
Yousef Khadadeh 2025-08-01 21:43:47 +03:00
parent 84ecd51ee0
commit d6d51129ed

View file

@ -199,9 +199,8 @@ MainServer::MainServer(World& initWorld, const std::string& serverLocalID):
DrawComponent::server_send_transform_many(*this, transformsToSend);
});
netServer->add_recv_callback(SERVER_UPDATE_COMPONENT, [&](std::shared_ptr<NetServer::ClientData> client, cereal::PortableBinaryInputArchive& message) {
bool isTemp;
ServerClientID idToUpdate;
message(isTemp, idToUpdate);
message(idToUpdate);
auto it = data.idToComponentMap.find(idToUpdate);
if(it != data.idToComponentMap.end()) {
std::shared_ptr<DrawComponent>& comp = it->second;