mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Updated Database
This commit is contained in:
parent
79657efaf8
commit
0d474b2286
@ -562,9 +562,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
|
||||||
@ -577,8 +584,14 @@ 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
|
||||||
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 )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user