if we don't find an object, request it be unloaded regardless of existence, to hopefully clear it to work next load attempt

This commit is contained in:
DarthArgus
2016-12-15 04:00:30 +00:00
parent b97a410dea
commit 34d841161e
@@ -1340,11 +1340,14 @@ void GameServer::receiveMessage(const MessageDispatch::Emitter & source, const M
LoadObjectMessage const t(ri);
ServerObject *const target = ServerWorld::findObjectByNetworkId(t.getId());
if (target)
if (target) {
createRemoteProxy(t.getProcess(), target);
else
WARNING(true, ("Told to create object %s on %d we know nothing about (received LoadObjectMessage for an object not on this server, PlanetServer is probably confused)", t
.getId().getValueString().c_str(), t.getProcess()));
} else {
WARNING(true, ("Told to create object %s on %d we know nothing about. Requesting unload.", t.getId().getValueString().c_str(), t.getProcess()));
UnloadObjectMessage const t(ri);
target->unload();
}
break;
}
case constcrc("UnloadObjectMessage") : {