mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Fixed bug in Movement
This commit is contained in:
parent
1739305d12
commit
e0d281272a
15
Movement.lua
15
Movement.lua
@ -67,12 +67,15 @@ trace.f( self.ClassName, { event } )
|
||||
if timer.getTime0() < timer.getAbsTime() then -- dont need to add units spawned in at the start of the mission if mist is loaded in init line
|
||||
if event.initiator and event.initiator:getName() then
|
||||
trace.l(self.ClassName, "OnBirth", "Birth object : " .. event.initiator:getName() )
|
||||
local EventGroupName = Unit.getGroup(event.initiator):getName()
|
||||
for MovePrefixID, MovePrefix in pairs( self.MovePrefixes ) do
|
||||
if string.find( EventGroupName, MovePrefix, 1, true ) then
|
||||
self.AliveUnits = self.AliveUnits + 1
|
||||
self.MoveGroups[EventGroupName] = EventGroupName
|
||||
trace.l(self.ClassName, "OnBirth", self.AliveUnits )
|
||||
local GroupData = Unit.getGroup(event.initiator)
|
||||
if GroupData and GroupData:isExist() then
|
||||
local EventGroupName = GroupData:getName()
|
||||
for MovePrefixID, MovePrefix in pairs( self.MovePrefixes ) do
|
||||
if string.find( EventGroupName, MovePrefix, 1, true ) then
|
||||
self.AliveUnits = self.AliveUnits + 1
|
||||
self.MoveGroups[EventGroupName] = EventGroupName
|
||||
trace.l(self.ClassName, "OnBirth", self.AliveUnits )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user