Fixed bug when decoding update messages
This commit is contained in:
parent
84ecd51ee0
commit
d6d51129ed
1 changed files with 1 additions and 2 deletions
|
|
@ -199,9 +199,8 @@ MainServer::MainServer(World& initWorld, const std::string& serverLocalID):
|
||||||
DrawComponent::server_send_transform_many(*this, transformsToSend);
|
DrawComponent::server_send_transform_many(*this, transformsToSend);
|
||||||
});
|
});
|
||||||
netServer->add_recv_callback(SERVER_UPDATE_COMPONENT, [&](std::shared_ptr<NetServer::ClientData> client, cereal::PortableBinaryInputArchive& message) {
|
netServer->add_recv_callback(SERVER_UPDATE_COMPONENT, [&](std::shared_ptr<NetServer::ClientData> client, cereal::PortableBinaryInputArchive& message) {
|
||||||
bool isTemp;
|
|
||||||
ServerClientID idToUpdate;
|
ServerClientID idToUpdate;
|
||||||
message(isTemp, idToUpdate);
|
message(idToUpdate);
|
||||||
auto it = data.idToComponentMap.find(idToUpdate);
|
auto it = data.idToComponentMap.find(idToUpdate);
|
||||||
if(it != data.idToComponentMap.end()) {
|
if(it != data.idToComponentMap.end()) {
|
||||||
std::shared_ptr<DrawComponent>& comp = it->second;
|
std::shared_ptr<DrawComponent>& comp = it->second;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue