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