1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

* bug 146 fixed

This commit is contained in:
mateuszb
2009-10-17 13:59:25 +00:00
parent dd7991c541
commit f109c51f7f
2 changed files with 3 additions and 3 deletions

View File

@@ -1051,7 +1051,7 @@ CBattleInterface::CBattleInterface(CCreatureSet * army1, CCreatureSet * army2, C
//preparing siege info //preparing siege info
const CGTownInstance * town = LOCPLINT->cb->battleGetDefendedTown(); const CGTownInstance * town = LOCPLINT->cb->battleGetDefendedTown();
if(town) if(town && town->hasFort())
{ {
siegeH = new SiegeHelper(town, this); siegeH = new SiegeHelper(town, this);
} }

View File

@@ -1100,7 +1100,7 @@ void CGameHandler::setupBattle( BattleInfo * curB, int3 tile, const CCreatureSet
stacks.push_back(stack); stacks.push_back(stack);
} }
} }
if(town && hero1) //catapult if(town && hero1 && town->hasFort()) //catapult
{ {
CStack * stack = curB->generateNewStack(hero1, 145, 1, stacks.size(), true, 255, gs->map->terrain[tile.x][tile.y][tile.z].tertype, 120); CStack * stack = curB->generateNewStack(hero1, 145, 1, stacks.size(), true, 255, gs->map->terrain[tile.x][tile.y][tile.z].tertype, 120);
stacks.push_back(stack); stacks.push_back(stack);
@@ -1127,7 +1127,7 @@ void CGameHandler::setupBattle( BattleInfo * curB, int3 tile, const CCreatureSet
std::stable_sort(stacks.begin(),stacks.end(),cmpst); std::stable_sort(stacks.begin(),stacks.end(),cmpst);
//seting up siege //seting up siege
if(town) if(town && town->hasFort())
{ {
for(int b=0; b<ARRAY_COUNT(curB->si.wallState); ++b) for(int b=0; b<ARRAY_COUNT(curB->si.wallState); ++b)
{ {