mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
CPathfinder: don't allow future movement after guarded tile
There is two exceptions: - Hero start movement from guarded tile. - Hero that embarking into boat that standing on guarded tile. In other cases future movement is impossible.
This commit is contained in:
@@ -318,8 +318,6 @@ bool CPathfinder::isMovementAfterDestPossible()
|
|||||||
return true; // For now we'll always allow transit for teleporters
|
return true; // For now we'll always allow transit for teleporters
|
||||||
if(useEmbarkCost && options.useEmbarkAndDisembark)
|
if(useEmbarkCost && options.useEmbarkAndDisembark)
|
||||||
return true;
|
return true;
|
||||||
if(isDestinationGuarded() && !isSourceGuarded())
|
|
||||||
return true; // Can step into a hostile tile once
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EPathfindingLayer::AIR:
|
case EPathfindingLayer::AIR:
|
||||||
|
Reference in New Issue
Block a user