Changeset - r4856:70471bc4e993
[Not reviewed]
master
0 1 0
peter1138 - 18 years ago 2006-10-15 20:46:10
peter1138@openttd.org
(svn r6782) - Fix (r3947): Invalidate depot & vehicle windows when reversing a single engine with ctrl-click.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
train_cmd.c
Show inline comments
 
@@ -1729,12 +1729,14 @@ int32 CmdReverseTrainDirection(TileIndex
 
		if (CheckTrainStoppedInDepot(front) < 0) {
 
			return_cmd_error(STR_881A_TRAINS_CAN_ONLY_BE_ALTERED);
 
		}
 

	
 
		if (flags & DC_EXEC) {
 
			TOGGLEBIT(v->u.rail.flags, VRF_REVERSE_DIRECTION);
 
			InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
 
			InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 
		}
 
	} else {
 
		//turn the whole train around
 
		if (v->u.rail.crash_anim_pos != 0 || v->breakdown_ctr != 0) return CMD_ERROR;
 

	
 
		if (flags & DC_EXEC) {
0 comments (0 inline, 0 general)