(svn r1025) -Fix: [Network] [ 1083687 ] Sending to depot caused desync because the
authortruelight
Sun, 12 Dec 2004 15:43:55 +0000
changeset 601 952c0295f79a
parent 600 701078838fde
child 602 9bbe42a9e3ed
(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)
command.c
train_gui.c
--- a/command.c	Sun Dec 12 14:28:08 2004 +0000
+++ b/command.c	Sun Dec 12 15:43:55 2004 +0000
@@ -422,7 +422,6 @@
 		(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;
--- a/train_gui.c	Sun Dec 12 14:28:08 2004 +0000
+++ b/train_gui.c	Sun Dec 12 15:43:55 2004 +0000
@@ -831,7 +831,8 @@
 			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));