mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-21 06:04:49 +00:00
Fix(Spawn):add nil gaurd to InitRandomizeZones
This commit is contained in:
@@ -1184,6 +1184,7 @@ end
|
||||
|
||||
--- This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types.
|
||||
-- @param #SPAWN self
|
||||
-- @param #table SpawnZoneTable A table with @{Core.Zone} objects. If nil or empty, the method returns self without effect.
|
||||
-- @param #table SpawnZoneTable A table with @{Core.Zone} objects. If this table is given, then each spawn will be executed within the given list of @{Core.Zone}s objects.
|
||||
-- @param #boolean RandomizePositionInZone If nil or true, also the position inside the selected random zone will be randomized. Set to false to use the center of the zone.
|
||||
-- @return #SPAWN self
|
||||
@@ -1201,6 +1202,9 @@ end
|
||||
function SPAWN:InitRandomizeZones( SpawnZoneTable, RandomizePositionInZone )
|
||||
--self:F( { self.SpawnTemplatePrefix, SpawnZoneTable } )
|
||||
|
||||
if not SpawnZoneTable then
|
||||
return self
|
||||
end;
|
||||
local temptable = {}
|
||||
for _,_temp in pairs(SpawnZoneTable) do
|
||||
temptable[#temptable+1] = _temp
|
||||
|
||||
Reference in New Issue
Block a user