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

CPathfinder: add rule that hero in boat can't visit empty boats

This commit is contained in:
ArseniyShestakov 2015-11-13 10:28:44 +03:00
parent d2baa5b0d0
commit 0be9d21132

View File

@ -387,6 +387,11 @@ bool CPathfinder::isMovementToDestPossible() const
if(dObj->ID != Obj::BOAT && dObj->ID != Obj::HERO) if(dObj->ID != Obj::BOAT && dObj->ID != Obj::HERO)
return false; return false;
} }
else if(dObj && dObj->ID == Obj::BOAT)
{
/// Hero in boat can't visit empty boats
return false;
}
break; break;