Fixed bug in Movement

This commit is contained in:
svenvandevelde 2015-11-01 07:14:05 +01:00
parent 1739305d12
commit e0d281272a
2 changed files with 10 additions and 7 deletions

View File

@ -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

View File

@ -6,7 +6,7 @@ trace = {}
trace.names = {}
trace.scheduledfunction = ""
trace.names.all = false
trace.names.all = true
trace.names.New = false
trace.names.Inherit = false
trace.names.do_scheduled_functions = false