mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Mapping of deletable coordinates to objects on map start
This commit is contained in:
@@ -62,16 +62,9 @@ void NewTurnProcessor::handleTimeEvents(PlayerColor color)
|
||||
}
|
||||
|
||||
//remove objects specified by event
|
||||
for(int3 coordinate : event.deletedObjectsCoordinates)
|
||||
for(const CGObjectInstance * objectToRemove : event.deletedObjectsInstances)
|
||||
{
|
||||
if(gameHandler->isInTheMap(coordinate))
|
||||
{
|
||||
auto objects = gameHandler->getBlockingObjs(coordinate);
|
||||
for(const CGObjectInstance * object : objects)
|
||||
{
|
||||
gameHandler->removeObject(object, PlayerColor::NEUTRAL);
|
||||
}
|
||||
}
|
||||
gameHandler->removeObject(objectToRemove, PlayerColor::NEUTRAL);
|
||||
}
|
||||
gameHandler->sendAndApply(&iw); //show dialog
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user