1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Dismissing heroes / minor.

This commit is contained in:
Michał W. Urbańczyk
2008-08-01 21:41:38 +00:00
parent bfad10a8e4
commit 1f4b4364df
8 changed files with 55 additions and 30 deletions

View File

@@ -1158,10 +1158,7 @@ bool CMapHandler::hideObject(CGObjectInstance *obj)
bool CMapHandler::removeObject(CGObjectInstance *obj)
{
hideObject(obj);
std::vector<CGObjectInstance *>::iterator db = std::find(map->objects.begin(), map->objects.end(), obj);
recalculateHideVisPosUnderObj(*db);
delete *db;
map->objects.erase(db);
recalculateHideVisPosUnderObj(obj);
return true;
}