summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-12 15:43:55 +0000
committertruelight <truelight@openttd.org>2004-12-12 15:43:55 +0000
commit88827672ec6fbeea2d91a956d038ffb4ac4df8cf (patch)
tree05c646c9077442f97c44846fe57d7386599241d6
parentea025cdae99e6dfb9a883b70ede4bae29b73eda7 (diff)
downloadopenttd-88827672ec6fbeea2d91a956d038ffb4ac4df8cf.tar.xz
(svn r1025) -Fix: [Network] [ 1083687 ] Sending to depot caused desync because the
new pathfinder uses a random, and the goto_depot uses the new pathfinder (if enabled)
-rw-r--r--command.c1
-rw-r--r--train_gui.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/command.c b/command.c
index 394ad6f12..c9bcdb59a 100644
--- a/command.c
+++ b/command.c
@@ -422,7 +422,6 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
(cmd & 0xFF) == CMD_CLEAR_AREA ||
(cmd & 0xFF) == CMD_CONVERT_RAIL ||
(cmd & 0xFF) == CMD_LEVEL_LAND ||
- (cmd & 0xFF) == CMD_TRAIN_GOTO_DEPOT ||
(cmd & 0xFF) == CMD_REMOVE_ROAD;
_docommand_recursive = 1;
diff --git a/train_gui.c b/train_gui.c
index e05778ea9..92175b13e 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -831,7 +831,8 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
ScrollMainWindowTo(v->x_pos, v->y_pos);
break;
case 6: /* goto depot */
- DoCommandP(v->tile, v->index, 0, NULL, CMD_TRAIN_GOTO_DEPOT | CMD_MSG(STR_8830_CAN_T_SEND_TRAIN_TO_DEPOT));
+ /* TrainGotoDepot has a nice randomizer in the pathfinder, which causes desyncs... */
+ DoCommandP(v->tile, v->index, 0, NULL, CMD_TRAIN_GOTO_DEPOT | CMD_NO_TEST_IF_IN_NETWORK | CMD_MSG(STR_8830_CAN_T_SEND_TRAIN_TO_DEPOT));
break;
case 7: /* force proceed */
DoCommandP(v->tile, v->index, 0, NULL, CMD_FORCE_TRAIN_PROCEED | CMD_MSG(STR_8862_CAN_T_MAKE_TRAIN_PASS_SIGNAL));