1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

- Moved gameState::guardingCreaturePosition() to CMap so it doesn't need to be recalculated many times for every player.

- Some optimizations with local cb pinter in VCAI.
This commit is contained in:
DjWarmonger
2014-04-01 11:53:28 +00:00
parent ec54381b12
commit 30b79588db
15 changed files with 192 additions and 108 deletions

View File

@ -380,6 +380,7 @@ DLL_LINKAGE void RemoveObject::applyGs( CGameState *gs )
}
gs->map->objects[id.getNum()].dellNull();
gs->map->calculateGuardingGreaturePositions();
}
static int getDir(int3 src, int3 dst)
@ -613,6 +614,7 @@ DLL_LINKAGE void NewObject::applyGs( CGameState *gs )
gs->map->objects.push_back(o);
gs->map->addBlockVisTiles(o);
o->initObj();
gs->map->calculateGuardingGreaturePositions();
logGlobal->debugStream() << "added object id=" << id << "; address=" << (intptr_t)o << "; name=" << o->getHoverText();
}