(svn r13794) -Fix: helicopters leaving a heliport could get stuck after processing conditional orders.
authorrubidium
Tue, 22 Jul 2008 23:29:08 +0000
changeset 9688 c3e4766447ed
parent 9687 07373ab2ac06
child 9689 0a506f06cbd2
(svn r13794) -Fix: helicopters leaving a heliport could get stuck after processing conditional orders.
src/aircraft_cmd.cpp
--- a/src/aircraft_cmd.cpp	Tue Jul 22 23:11:40 2008 +0000
+++ b/src/aircraft_cmd.cpp	Tue Jul 22 23:29:08 2008 +0000
@@ -1631,6 +1631,11 @@
 				v->u.air.state = (v->subtype == AIR_HELICOPTER) ? HELITAKEOFF : TAKEOFF;
 			}
 			break;
+		case OT_CONDITIONAL:
+			/* In case of a conditional order we just have to wait a tick
+			 * longer, so the conditional order can actually be processed;
+			 * we should not clear the order as that makes us go nowhere. */
+			return;
 		default:  // orders have been deleted (no orders), goto depot and don't bother us
 			v->current_order.Free();
 			v->u.air.state = HANGAR;