Changeset - r3259:a2faa2105328
[Not reviewed]
master
0 1 0
bjarni - 19 years ago 2006-03-18 14:35:54
bjarni@openttd.org
(svn r3947) use TOGGLEBIT() instead of manual bit toggling in CmdReverseTrainDirection (pointed out by glx)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
train_cmd.c
Show inline comments
 
@@ -1606,13 +1606,13 @@ static void ReverseTrainDirection(Vehicl
 
		// make sure the vehicle is stopped in the depot
 
		if (CheckTrainStoppedInDepot(front) < 0) {
 
			return_cmd_error(STR_881A_TRAINS_CAN_ONLY_BE_ALTERED);
 
		}
 

	
 
		if (flags & DC_EXEC) {
 
			v->u.rail.flags ^= 1 << VRF_REVERSE_DIRECTION;
 
			TOGGLEBIT(v->u.rail.flags, VRF_REVERSE_DIRECTION);
 
		}
 
	} 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)