1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00
- fixed crash at campaigns loading
- minor fixes
This commit is contained in:
Ivan Savenko
2011-11-25 19:41:23 +00:00
parent a62634cf94
commit 29f42aa873
8 changed files with 38 additions and 43 deletions

View File

@@ -270,12 +270,6 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details)
//TODO: smooth disappear / appear effect
}
if(details.start == details.end) //last step
{
eraseCurrentPathOf(ho);
return;
}
if (ho->pos != details.end //hero didn't change tile but visit succeeded
|| directlyAttackingCreature) // or creature was attacked from endangering tile.
{
@@ -283,8 +277,8 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details)
}
else if(adventureInt->terrain.currentPath && ho->pos == details.end) //&& hero is moving
{
//remove one node from the path (the one we went)
removeLastNodeFromPath(ho);
if (adventureInt->terrain.currentPath->endPos() != details.end)
removeLastNodeFromPath(ho);
}
}