Merge remote-tracking branch 'refs/remotes/origin/master' into master-bugfix

This commit is contained in:
FlightControl
2017-03-05 10:15:27 +01:00
3 changed files with 57 additions and 37 deletions
+3 -5
View File
@@ -584,19 +584,15 @@ function DATABASE:_EventOnPlayerEnterUnit( Event )
self:F2( { Event } ) self:F2( { Event } )
if Event.IniUnit then if Event.IniUnit then
if Event.IniObjectCategory == 3 then
self:AddStatic( Event.IniDCSUnitName )
else
if Event.IniObjectCategory == 1 then if Event.IniObjectCategory == 1 then
self:AddUnit( Event.IniDCSUnitName ) self:AddUnit( Event.IniDCSUnitName )
self:AddGroup( Event.IniDCSGroupName ) self:AddGroup( Event.IniDCSGroupName )
end
end
local PlayerName = Event.IniUnit:GetPlayerName() local PlayerName = Event.IniUnit:GetPlayerName()
if not self.PLAYERS[PlayerName] then if not self.PLAYERS[PlayerName] then
self:AddPlayer( Event.IniUnitName, PlayerName ) self:AddPlayer( Event.IniUnitName, PlayerName )
end end
end end
end
end end
@@ -607,11 +603,13 @@ function DATABASE:_EventOnPlayerLeaveUnit( Event )
self:F2( { Event } ) self:F2( { Event } )
if Event.IniUnit then if Event.IniUnit then
if Event.IniObjectCategory == 1 then
local PlayerName = Event.IniUnit:GetPlayerName() local PlayerName = Event.IniUnit:GetPlayerName()
if self.PLAYERS[PlayerName] then if self.PLAYERS[PlayerName] then
self:DeletePlayer( PlayerName ) self:DeletePlayer( PlayerName )
end end
end end
end
end end
--- Iterators --- Iterators
@@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' ) env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170305_0950' ) env.info( 'Moose Generation Timestamp: 20170305_1014' )
local base = _G local base = _G
Include = {} Include = {}
@@ -7766,9 +7766,16 @@ function DATABASE:_EventOnDeadOrCrash( Event )
self:F2( { Event } ) self:F2( { Event } )
if Event.IniDCSUnit then if Event.IniDCSUnit then
if Event.IniObjectCategory == 3 then
if self.STATICS[Event.IniDCSUnitName] then
self:DeleteStatic( Event.IniDCSUnitName )
end
else
if Event.IniObjectCategory == 1 then
if self.UNITS[Event.IniDCSUnitName] then if self.UNITS[Event.IniDCSUnitName] then
self:DeleteUnit( Event.IniDCSUnitName ) self:DeleteUnit( Event.IniDCSUnitName )
-- add logic to correctly remove a group once all units are destroyed... end
end
end end
end end
end end
@@ -7781,6 +7788,7 @@ function DATABASE:_EventOnPlayerEnterUnit( Event )
self:F2( { Event } ) self:F2( { Event } )
if Event.IniUnit then if Event.IniUnit then
if Event.IniObjectCategory == 1 then
self:AddUnit( Event.IniDCSUnitName ) self:AddUnit( Event.IniDCSUnitName )
self:AddGroup( Event.IniDCSGroupName ) self:AddGroup( Event.IniDCSGroupName )
local PlayerName = Event.IniUnit:GetPlayerName() local PlayerName = Event.IniUnit:GetPlayerName()
@@ -7788,6 +7796,7 @@ function DATABASE:_EventOnPlayerEnterUnit( Event )
self:AddPlayer( Event.IniUnitName, PlayerName ) self:AddPlayer( Event.IniUnitName, PlayerName )
end end
end end
end
end end
@@ -7798,11 +7807,13 @@ function DATABASE:_EventOnPlayerLeaveUnit( Event )
self:F2( { Event } ) self:F2( { Event } )
if Event.IniUnit then if Event.IniUnit then
if Event.IniObjectCategory == 1 then
local PlayerName = Event.IniUnit:GetPlayerName() local PlayerName = Event.IniUnit:GetPlayerName()
if self.PLAYERS[PlayerName] then if self.PLAYERS[PlayerName] then
self:DeletePlayer( PlayerName ) self:DeletePlayer( PlayerName )
end end
end end
end
end end
--- Iterators --- Iterators
+13 -2
View File
@@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' ) env.info( '*** MOOSE STATIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170305_0950' ) env.info( 'Moose Generation Timestamp: 20170305_1014' )
local base = _G local base = _G
Include = {} Include = {}
@@ -7766,9 +7766,16 @@ function DATABASE:_EventOnDeadOrCrash( Event )
self:F2( { Event } ) self:F2( { Event } )
if Event.IniDCSUnit then if Event.IniDCSUnit then
if Event.IniObjectCategory == 3 then
if self.STATICS[Event.IniDCSUnitName] then
self:DeleteStatic( Event.IniDCSUnitName )
end
else
if Event.IniObjectCategory == 1 then
if self.UNITS[Event.IniDCSUnitName] then if self.UNITS[Event.IniDCSUnitName] then
self:DeleteUnit( Event.IniDCSUnitName ) self:DeleteUnit( Event.IniDCSUnitName )
-- add logic to correctly remove a group once all units are destroyed... end
end
end end
end end
end end
@@ -7781,6 +7788,7 @@ function DATABASE:_EventOnPlayerEnterUnit( Event )
self:F2( { Event } ) self:F2( { Event } )
if Event.IniUnit then if Event.IniUnit then
if Event.IniObjectCategory == 1 then
self:AddUnit( Event.IniDCSUnitName ) self:AddUnit( Event.IniDCSUnitName )
self:AddGroup( Event.IniDCSGroupName ) self:AddGroup( Event.IniDCSGroupName )
local PlayerName = Event.IniUnit:GetPlayerName() local PlayerName = Event.IniUnit:GetPlayerName()
@@ -7788,6 +7796,7 @@ function DATABASE:_EventOnPlayerEnterUnit( Event )
self:AddPlayer( Event.IniUnitName, PlayerName ) self:AddPlayer( Event.IniUnitName, PlayerName )
end end
end end
end
end end
@@ -7798,11 +7807,13 @@ function DATABASE:_EventOnPlayerLeaveUnit( Event )
self:F2( { Event } ) self:F2( { Event } )
if Event.IniUnit then if Event.IniUnit then
if Event.IniObjectCategory == 1 then
local PlayerName = Event.IniUnit:GetPlayerName() local PlayerName = Event.IniUnit:GetPlayerName()
if self.PLAYERS[PlayerName] then if self.PLAYERS[PlayerName] then
self:DeletePlayer( PlayerName ) self:DeletePlayer( PlayerName )
end end
end end
end
end end
--- Iterators --- Iterators