mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
[Client] Ignore invalid object refIds from ObjectPlace packets
This commit is contained in:
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…
x
Reference in New Issue
Block a user