Loading

Revision differences

Old revision #plgc7fnxcNew revision #pt1vlref5
10+        /* Ask pathfinder for best direction */  10+        /* Ask pathfinder for best direction */  
11+        bool reverse = false;  11+        bool reverse = false;  
12+        switch (_settings_game.pf.pathfinder_for_ships) {  12+        switch (_settings_game.pf.pathfinder_for_ships) {  
13+            case VPF_OPF: reverse = true; break; // OPF always allows reversing  13+            case VPF_OPF: break; // Just go north, because OPF gives assertion if it's asked to give a direction.
14+            case VPF_NPF: reverse = NPFShipCheckReverse(v); break;  14+            case VPF_NPF: reverse = NPFShipCheckReverse(v); break; // Ugly behaviour. It better reverse mid-water than head to the worng direction.
15+            case VPF_YAPF: reverse = YapfShipCheckReverse(v); break;  15+            case VPF_YAPF: reverse = YapfShipCheckReverse(v); break; // Best looking behaviour.
16+        default: NOT_REACHED();  16+        default: NOT_REACHED();  
17+        }  17+        }  
18+        if (reverse) {  18+        if (reverse) {