MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / spawnObject

Method spawnObject

Engine/source/T3D/missionMarker.cpp:378–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378SimObject* SpawnSphere::spawnObject(String additionalProps)
379{
380 SimObject* spawnObject = Sim::spawnObject(mSpawnClass, mSpawnDataBlock, mSpawnName,
381 mSpawnProperties + " " + additionalProps, mSpawnScript);
382
383 // If we have a spawnObject add it to the MissionCleanup group
384 if (spawnObject)
385 {
386 if (mSpawnTransform)
387 {
388 if(SceneObject *s = dynamic_cast<SceneObject*>(spawnObject))
389 s->setTransform(getTransform());
390 }
391
392 SimObject* cleanup = Sim::findObject("MissionCleanup");
393
394 if (cleanup)
395 {
396 SimGroup* missionCleanup = dynamic_cast<SimGroup*>(cleanup);
397
398 missionCleanup->addObject(spawnObject);
399 }
400 }
401
402 return spawnObject;
403}
404
405void SpawnSphere::inspectPostApply()
406{

Callers 3

spawnTargetMethod · 0.80
spawnTargetMethod · 0.80
missionMarker.cppFile · 0.80

Calls 4

spawnObjectFunction · 0.85
findObjectFunction · 0.50
setTransformMethod · 0.45
addObjectMethod · 0.45

Tested by

no test coverage detected