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

Method init_missile_c

Engine/source/afx/afxMagicSpell.cpp:1612–1634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1610}
1611
1612void afxMagicSpell::init_missile_c(afxMagicMissileData* mm_db)
1613{
1614 if (mMissile)
1615 clearNotify(mMissile);
1616
1617 // create the missile
1618 mMissile = new afxMagicMissile(false, true);
1619 mMissile->setSubstitutionData(this, ranking);
1620 mMissile->setDataBlock(mm_db);
1621 mMissile->setChoreographer(this);
1622 if (!mMissile->registerObject())
1623 {
1624 Con::errorf("afxMagicSpell: failed to register missile instance.");
1625 delete mMissile;
1626 mMissile = NULL;
1627 }
1628
1629 if (mMissile)
1630 {
1631 deleteNotify(mMissile);
1632 registerForCleanup(mMissile);
1633 }
1634}
1635
1636void afxMagicSpell::launch_missile_c()
1637{

Callers

nothing calls this directly

Calls 6

registerForCleanupFunction · 0.85
setDataBlockMethod · 0.80
errorfFunction · 0.50
setSubstitutionDataMethod · 0.45
setChoreographerMethod · 0.45
registerObjectMethod · 0.45

Tested by

no test coverage detected