mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Removed Group usage from _AddPlayerFromUnit
Due to bug 1.5 in DCS world
This commit is contained in:
parent
b8148a7950
commit
84b79b0a75
@ -305,13 +305,9 @@ trace.f( self.ClassName, UnitData )
|
||||
|
||||
if UnitData:isExist() then
|
||||
local UnitName = UnitData:getName()
|
||||
local GroupData = UnitData:getGroup()
|
||||
|
||||
if GroupData and GroupData:isExist() then
|
||||
local GroupName = GroupData:getName()
|
||||
local PlayerName = UnitData:getPlayerName()
|
||||
|
||||
trace.i(self.ClassName, "Player : " .. PlayerName .. " Unit : " .. UnitName .. " Group : " .. GroupName )
|
||||
trace.i(self.ClassName, "Player : " .. PlayerName .. " Unit : " .. UnitName )
|
||||
|
||||
if self.Players[PlayerName] == nil then -- I believe this is the place where a Player gets a life in a mission when he enters a unit ...
|
||||
self.Players[PlayerName] = {}
|
||||
@ -330,7 +326,7 @@ trace.f( self.ClassName, UnitData )
|
||||
end
|
||||
|
||||
if not self.Players[PlayerName].UnitCoalition then
|
||||
self.Players[PlayerName].UnitCoalition = Unit.getGroup(UnitData):getCoalition()
|
||||
self.Players[PlayerName].UnitCoalition = Unit:getCoalition()
|
||||
else
|
||||
if self.Players[PlayerName].UnitCoalition ~= Unit.getGroup(UnitData):getCoalition() then
|
||||
self.Players[PlayerName].Penalty = self.Players[PlayerName].Penalty + 50
|
||||
@ -343,13 +339,10 @@ trace.f( self.ClassName, UnitData )
|
||||
end
|
||||
end
|
||||
self.Players[PlayerName].UnitName = UnitName
|
||||
self.Players[PlayerName].GroupName = GroupName
|
||||
|
||||
self.Players[PlayerName].UnitCoalition = Unit.getGroup(UnitData):getCoalition()
|
||||
self.Players[PlayerName].UnitCategory = Unit.getGroup(UnitData):getCategory()
|
||||
self.Players[PlayerName].UnitCoalition = Unit:getCoalition()
|
||||
self.Players[PlayerName].UnitCategory = Unit:getCategory()
|
||||
self.Players[PlayerName].UnitType = UnitData:getTypeName()
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -427,8 +420,8 @@ trace.f( self.ClassName, { event } )
|
||||
InitGroupName = Unit.getGroup(event.initiator):getName()
|
||||
InitPlayerName = event.initiator:getPlayerName()
|
||||
|
||||
InitCoalition = Unit.getGroup(event.initiator):getCoalition()
|
||||
InitCategory = Unit.getGroup(event.initiator):getCategory()
|
||||
InitCoalition = Unit:getCoalition()
|
||||
InitCategory = Unit:getCategory()
|
||||
InitType = event.initiator:getTypeName()
|
||||
|
||||
InitUnitCoalition = DATABASECoalition[InitCoalition]
|
||||
|
||||
@ -78,6 +78,7 @@ trace.f( self.ClassName, { self.GroupName, Point, Radius } )
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
function GROUP:_GetController()
|
||||
|
||||
return self._Group:getController()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user