[Client] Ignore invalid object refIds from ObjectPlace packets

0.6.3
David Cernat 7 years ago
parent 4496625154
commit ce5670e57e

@ -173,8 +173,11 @@ void WorldEvent::placeObjects(MWWorld::CellStore* cellStore)
// Only create this object if it doesn't already exist
if (!ptrFound)
{
try
{
MWWorld::ManualRef ref(world->getStore(), worldObject.refId, 1);
MWWorld::Ptr newPtr = ref.getPtr();
if (worldObject.count > 1)
@ -194,6 +197,12 @@ void WorldEvent::placeObjects(MWWorld::CellStore* cellStore)
if (guid == Main::get().getLocalPlayer()->guid && worldObject.droppedByPlayer)
world->PCDropped(newPtr);
}
catch (std::exception&)
{
LOG_APPEND(Log::LOG_INFO, "-- Ignored placement of invalid object");
}
}
else
LOG_APPEND(Log::LOG_VERBOSE, "-- Object already existed!");

Loading…
Cancel
Save