Makes sure if you don't spawn a game object into MissionGroup, it spawns it into MissionCleanup.

This commit is contained in:
Areloch 2016-05-30 21:30:02 -05:00
parent 553cf260f1
commit bbf7865a77

View file

@ -77,8 +77,10 @@ function spawnGameObject(%name, %addToMissionGroup)
{
%newSGOObject = TamlRead(%gameObjectAsset.TAMLFilePath);
if(%addToMissionGroup == true)
if(%addToMissionGroup == true) //save instance when saving level
MissionGroup.add(%newSGOObject);
else // clear instance on level exit
MissionCleanup.add(%newSGOObject);
return %newSGOObject;
}