1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-05 23:28:14 +02:00

* servers will not allow using out-of-range slots ( #1061 )

* server won't crash on some scenarios when they're used
* fixed some minor discrepancies with creature placement in creature banks
This commit is contained in:
Michał W. Urbańczyk
2012-08-30 16:01:19 +00:00
parent 838c226a31
commit 6530e7a1e1
8 changed files with 60 additions and 57 deletions

View File

@@ -348,7 +348,7 @@ bool CBattleInfoEssentials::battleCanSurrender(int player) const
{
RETURN_IF_NOT_BATTLE(false);
//conditions like for fleeing + enemy must have a hero
return battleCanFlee(player) && battleGetFightingHero(!playerToSide(player));
return battleCanFlee(player) && battleHasHero(!playerToSide(player));
}
bool CBattleInfoEssentials::battleHasHero(ui8 side) const