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

* animation of catapult

* stacks won't be reversed when attacked by turrets
This commit is contained in:
mateuszb
2009-09-24 13:44:55 +00:00
parent 307c20e7dc
commit 9a1669b926
7 changed files with 61 additions and 22 deletions

View File

@ -1088,10 +1088,10 @@ DLL_EXPORT void CatapultAttack::applyGs( CGameState *gs )
{
if(gs->curB && gs->curB->siege != 0) //if there is a battle and it's a siege
{
for(std::set< std::pair<ui8, ui8> >::const_iterator it = attackedParts.begin(); it != attackedParts.end(); ++it)
for(std::set< std::pair< std::pair< ui8, si16 >, ui8> >::const_iterator it = attackedParts.begin(); it != attackedParts.end(); ++it)
{
gs->curB->si.wallState[it->first] =
std::min( gs->curB->si.wallState[it->first] + it->second, 3 );
gs->curB->si.wallState[it->first.first] =
std::min( gs->curB->si.wallState[it->first.first] + it->second, 3 );
}
}
}