Fixed bug in Scheduler (a real nasty one) and SET_UNIT

This commit is contained in:
FlightControl
2016-07-23 20:26:08 +02:00
parent 906045a027
commit c10e293ff7
49 changed files with 104 additions and 63 deletions

View File

@@ -318,6 +318,8 @@ function SET_BASE:Remove( ObjectName )
self:F( ObjectName )
local t = self.Set[ObjectName]
self:E( { ObjectName, t } )
if t then
if t._next then
@@ -1132,7 +1134,7 @@ function SET_UNIT:RemoveUnitsByName( RemoveUnitNames )
local RemoveUnitNamesArray = ( type( RemoveUnitNames ) == "table" ) and RemoveUnitNames or { RemoveUnitNames }
for RemoveUnitID, RemoveUnitName in pairs( RemoveUnitNamesArray ) do
self:Remove( RemoveUnitName.UnitName )
self:Remove( RemoveUnitName )
end
return self