equal
deleted
inserted
replaced
304 function WrightAI::HandleEvents() |
304 function WrightAI::HandleEvents() |
305 { |
305 { |
306 while (AIEventController.IsEventWaiting()) { |
306 while (AIEventController.IsEventWaiting()) { |
307 local e = AIEventController.GetNextEvent(); |
307 local e = AIEventController.GetNextEvent(); |
308 switch (e.GetEventType()) { |
308 switch (e.GetEventType()) { |
309 case AIEvent.AI_ET_CRASHED_VEHICLE: |
309 case AIEvent.AI_ET_VEHICLE_CRASHED: |
310 local ec = AIEventVehicleCrash.Convert(e); |
310 local ec = AIEventVehicleCrashed.Convert(e); |
311 local v = ec.GetVehicleID(); |
311 local v = ec.GetVehicleID(); |
312 AILog.Info("We have a crashed vehicle (" + v + "), buying a new one as replacement"); |
312 AILog.Info("We have a crashed vehicle (" + v + "), buying a new one as replacement"); |
313 this.BuildAircraft(this.route_1.GetValue(v), this.route_2.GetValue(v)); |
313 this.BuildAircraft(this.route_1.GetValue(v), this.route_2.GetValue(v)); |
314 this.route_1.RemoveItem(v); |
314 this.route_1.RemoveItem(v); |
315 this.route_2.RemoveItem(v); |
315 this.route_2.RemoveItem(v); |