Improved the CleanUp

CleanUp now works detecting if units are floating above airport runways,
and if they do, they will be destroyed.
This commit is contained in:
svenvandevelde
2015-12-02 13:42:33 +01:00
parent 921a9999cb
commit 92c9b27b71
4 changed files with 92 additions and 79 deletions
+6
View File
@@ -143,6 +143,12 @@ function BASE:onEvent(event)
--env.info( 'onEvent EventObject.Event = ' .. tostring(EventObject.Event) )
if event.id == EventObject.Event then
if self == EventObject.Self then
if event.initiator and event.initiator:isExist() then
event.IniUnitName = event.initiator:getName()
end
if event.target and event.target:isExist() then
event.TgtUnitName = event.target:getName()
end
trace.i( self.ClassName, { BaseEventCodes[event.id], event } )
EventObject.EventFunction( self, event )
end