Changeset - r12880:84d5835cb08e
[Not reviewed]
master
0 1 0
yexo - 15 years ago 2009-09-02 15:13:33
yexo@openttd.org
(svn r17382) -Cleanup: don't set load_unload_time_rem when an aircraft turns in the air as it's not used
1 file changed with 1 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/aircraft_cmd.cpp
Show inline comments
 
@@ -1045,14 +1045,12 @@ static bool AircraftController(Aircraft 
 
	if (amd->flag & AMED_LAND)       { speed_limit = SPEED_LIMIT_APPROACH; hard_limit = false; }
 
	if (amd->flag & AMED_BRAKE)      { speed_limit = SPEED_LIMIT_TAXI;     hard_limit = false; }
 

	
 
	count = UpdateAircraftSpeed(v, speed_limit, hard_limit);
 
	if (count == 0) return false;
 

	
 
	if (v->load_unload_time_rem != 0) v->load_unload_time_rem--;
 

	
 
	do {
 

	
 
		GetNewVehiclePosResult gp;
 

	
 
		if (dist < 4 || (amd->flag & AMED_LAND)) {
 
			/* move vehicle one pixel towards target */
 
@@ -1069,15 +1067,13 @@ static bool AircraftController(Aircraft 
 
		} else {
 

	
 
			/* Turn. Do it slowly if in the air. */
 
			Direction newdir = GetDirectionTowards(v, x + amd->x, y + amd->y);
 
			if (newdir != v->direction) {
 
				v->direction = newdir;
 
				if (amd->flag & AMED_SLOWTURN) {
 
					if (v->load_unload_time_rem == 0) v->load_unload_time_rem = 8;
 
				} else {
 
				if (!(amd->flag & AMED_SLOWTURN)) {
 
					v->cur_speed >>= 1;
 
				}
 
			}
 

	
 
			/* Move vehicle. */
 
			gp = GetNewVehiclePos(v);
0 comments (0 inline, 0 general)