2
0
Эх сурвалжийг харах

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

AzaezelX 2 жил өмнө
parent
commit
e944d117e1

+ 2 - 1
Engine/source/T3D/missionMarker.cpp

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