forked from teamnwah/openmw-tes3coop
Only delete object from ID_WORLD_OBJECT_DELETE if it actually exists
This commit is contained in:
parent
3c49157ed7
commit
2e57e25675
1 changed files with 7 additions and 4 deletions
|
@ -656,11 +656,14 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet)
|
||||||
|
|
||||||
MWWorld::Ptr ptrFound = ptrCellStore->searchByRefNum(event->cellRef.mRefNum);
|
MWWorld::Ptr ptrFound = ptrCellStore->searchByRefNum(event->cellRef.mRefNum);
|
||||||
|
|
||||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Found %s, %i",
|
if (ptrFound)
|
||||||
ptrFound.getCellRef().getRefId().c_str(),
|
{
|
||||||
ptrFound.getCellRef().getRefNum());
|
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Found %s, %i",
|
||||||
|
ptrFound.getCellRef().getRefId().c_str(),
|
||||||
|
ptrFound.getCellRef().getRefNum());
|
||||||
|
|
||||||
MWBase::Environment::get().getWorld()->deleteObject(ptrFound);
|
MWBase::Environment::get().getWorld()->deleteObject(ptrFound);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue