mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-21 17:17:06 +02:00
Remove objects deleted by event from owned objects list
This commit is contained in:
parent
3bff68958e
commit
99f49ee6ad
@ -1224,6 +1224,9 @@ void RemoveObject::applyGs(CGameState *gs)
|
||||
}
|
||||
}
|
||||
|
||||
if(initiator == PlayerColor::NEUTRAL && obj->tempOwner.isValidPlayer())
|
||||
gs->getPlayerState(obj->tempOwner)->removeOwnedObject(obj); //object removed via map event
|
||||
|
||||
gs->map->instanceNames.erase(obj->instanceName);
|
||||
gs->map->objects[objectID.getNum()].dellNull();
|
||||
gs->map->calculateGuardingGreaturePositions();//FIXME: excessive, update only affected tiles
|
||||
|
Loading…
Reference in New Issue
Block a user