Check players

This commit is contained in:
FlightControl
2017-04-27 12:11:09 +02:00
parent 5a2594853c
commit 26033a4172
2 changed files with 47 additions and 4 deletions

View File

@@ -730,6 +730,21 @@ do -- Event Creation
world.onEvent( Event )
end
--- Creation of a S_EVENT_PLAYER_ENTER_UNIT Event.
-- @param #EVENT self
-- @param Wrapper.Unit#UNIT PlayerUnit.
function EVENT:CreateEventPlayerEnterUnit( PlayerUnit )
self:F( { PlayerUnit } )
local Event = {
id = EVENTS.PlayerEnterUnit,
time = timer.getTime(),
initiator = PlayerUnit:GetDCSObject()
}
world.onEvent( Event )
end
end
--- @param #EVENT self
@@ -749,8 +764,6 @@ function EVENT:onEvent( Event )
local EventMeta = _EVENTMETA[Event.id]
self:E( { EventMeta.Text, Event } )
if self and self.Events and self.Events[Event.id] then
if Event.initiator then