Loading

Revision differences

Old revision #pfrpc7gorNew revision #pntsd7s9a
2===================================================================  2===================================================================  
3--- src/station_cmd.cpp    (revision 27632)  3--- src/station_cmd.cpp    (revision 27632)  
4+++ src/station_cmd.cpp    (working copy)  4+++ src/station_cmd.cpp    (working copy)  
5@@ -2504,6 +2504,9 @@  5@@ -2504,6 +2504,21 @@
6         return_cmd_error(STR_ERROR_SITE_UNSUITABLE);  6         return_cmd_error(STR_ERROR_SITE_UNSUITABLE);  
7     }  7     }  
8   8   
9+    ret = EnsureNoShipOnDiagDir(tile_cur, ReverseDiagDir(direction));  9+    TileIndex tc = tile_cur;
   10+    DiagDirection dir_rotate = ReverseDiagDir(direction);
   11+    ret = EnsureNoShipOnDiagDir(tc, dir_rotate);
   12+    if (ret.Failed()) return ret;
   13+
   14+    tc = dir_rotate == DIAGDIR_NE ? tc + TileDiffXY(-1, -1) : dir_rotate == DIAGDIR_NW ? tc + TileDiffXY(1, -1) : dir_rotate == DIAGDIR_SW ? tc + TileDiffXY(1, 1) : tc + TileDiffXY(-1, 1);
   15+    dir_rotate = ChangeDiagDir(dir_rotate, DIAGDIRDIFF_90RIGHT);
   16+    ret = EnsureNoShipOnDiagDir(tc, dir_rotate);
   17+    if (ret.Failed()) return ret;
   18+
   19+    tc = dir_rotate == DIAGDIR_NE ? tc + TileDiffXY(-2, 0) : dir_rotate == DIAGDIR_NW ? tc + TileDiffXY(0, -2) : dir_rotate == DIAGDIR_SW ? tc + TileDiffXY(2, 0) : tc + TileDiffXY(0, 2);
   20+    dir_rotate = ReverseDiagDir(dir_rotate);
   21+    ret = EnsureNoShipOnDiagDir(tc, dir_rotate);
10+    if (ret.Failed()) return ret;  22+    if (ret.Failed()) return ret;  
11+  23+  
12     TileArea dock_area = TileArea(tile + ToTileIndexDiff(_dock_tileoffs_chkaround[direction]),  24     TileArea dock_area = TileArea(tile + ToTileIndexDiff(_dock_tileoffs_chkaround[direction]),