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

- hopefully better town development for AI

- fixed minimap blitting
- fixed crash on attacking town without moat
This commit is contained in:
Ivan Savenko
2012-05-19 16:22:34 +00:00
parent 6f6cd6814e
commit 665837d656
10 changed files with 154 additions and 64 deletions

View File

@@ -418,10 +418,9 @@ shared_ptr<const CObstacleInstance> CBattleInfoCallback::battleGetObstacleOnPos(
if(!gs->curB)
return NULL;
auto ptr = gs->curB->obstacles.front();
shared_ptr<const CObstacleInstance> nastala = ptr;
//unused? causes crash in forts without moat
//auto ptr = gs->curB->obstacles.front();
//shared_ptr<const CObstacleInstance> nastala = ptr;
BOOST_FOREACH(auto &obs, battleGetAllObstacles())
{
@@ -431,9 +430,6 @@ shared_ptr<const CObstacleInstance> CBattleInfoCallback::battleGetObstacleOnPos(
return obs;
}
}
return NULL;
}