spawnsphere %this tracking

fill out a %this var for sawnobjects prior to running the spawnscript command to give it acess to the spawner instance in addition to the spawned instance
This commit is contained in:
AzaezelX 2023-03-01 17:49:10 -06:00
parent 39b9b47caf
commit e944d117e1

View file

@ -377,8 +377,9 @@ bool SpawnSphere::onAdd()
SimObject* SpawnSphere::spawnObject(String additionalProps)
{
String command = String("%this = ") + getIdString() + ";" + mSpawnScript;
SimObject* spawnObject = Sim::spawnObject(mSpawnClass, mSpawnDataBlock, mSpawnName,
mSpawnProperties + " " + additionalProps, mSpawnScript);
mSpawnProperties + " " + additionalProps, command);
// If we have a spawnObject add it to the MissionCleanup group
if (spawnObject)