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

- Refactoring legacy code

- Some checks for #2311
This commit is contained in:
DjWarmonger
2015-10-24 15:09:46 +02:00
parent 86e1ae928e
commit abe88ea890
2 changed files with 19 additions and 14 deletions

View File

@@ -468,6 +468,12 @@ static int getDir(int3 src, int3 dst)
void TryMoveHero::applyGs( CGameState *gs )
{
CGHeroInstance *h = gs->getHero(id);
if (!h)
{
logGlobal->errorStream() << "Attempt ot move unavailable hero " << id;
return;
}
h->movement = movePoints;
if((result == SUCCESS || result == BLOCKING_VISIT || result == EMBARK || result == DISEMBARK) && start != end)