mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
Do not allow U-turns while flying. Works fine, but poor representation in
UI
This commit is contained in:
@@ -136,6 +136,9 @@ void CPathfinder::calculatePaths()
|
|||||||
if(neighbour->locked)
|
if(neighbour->locked)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (source.node->theNodeBefore && source.node->theNodeBefore->coord == neighbour->coord )
|
||||||
|
continue; // block U-turns
|
||||||
|
|
||||||
if(!hlp->isLayerAvailable(neighbour->layer))
|
if(!hlp->isLayerAvailable(neighbour->layer))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user