Event Handling improved

This commit is contained in:
FlightControl
2017-02-07 10:34:16 +01:00
parent e9a4429f7a
commit 154f729788
16 changed files with 432 additions and 64241 deletions

View File

@@ -350,7 +350,7 @@ function AI_CAS_ZONE:onafterStart( Controllable, From, Event, To )
-- Call the parent Start event handler
self:GetParent(self).onafterStart( self, Controllable, From, Event, To )
self:EventOnDead( self.OnDead )
self:HandleEvent( EVENTS.Dead, self.OnDead )
self:SetDetectionDeactivated() -- When not engaging, set the detection off.
end

View File

@@ -591,9 +591,9 @@ function AI_PATROL_ZONE:onafterStart( Controllable, From, Event, To )
self:__Status( 60 ) -- Check status status every 30 seconds.
self:SetDetectionActivated()
self:EventOnPilotDead( self.OnPilotDead )
self:EventOnCrash( self.OnCrash )
self:EventOnEjection( self.OnEjection )
self:HandleEvent( EVENTS.PilotDead, self.OnPilotDead )
self:HandleEvent( EVENTS.Crash, self.OnCrash )
self:HandleEvent( EVENTS.Ejection, self.OnEjection )
Controllable:OptionROEHoldFire()
Controllable:OptionROTVertical()