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

Method launch

Engine/source/afx/afxMagicMissile.cpp:2013–2050  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2011// public:
2012
2013void afxMagicMissile::launch()
2014{
2015 get_launch_data(mCurrPosition, mCurrVelocity);
2016
2017 mCurrDeltaBase = mCurrPosition;
2018 mCurrBackDelta.zero();
2019
2020 did_launch = true;
2021
2022 setPosition(mCurrPosition);
2023
2024 afxMagicSpell* spell = dynamic_cast<afxMagicSpell*>(choreographer);
2025 if (spell)
2026 {
2027 if (mDataBlock->reverse_targeting)
2028 {
2029 missile_target = spell->mCaster;
2030 collide_exempt = spell->mTarget;
2031 }
2032 else
2033 {
2034 missile_target = spell->mTarget;
2035 collide_exempt = spell->mCaster;
2036 }
2037
2038 if (spell->mCaster)
2039 processAfter(spell->mCaster);
2040 if (missile_target)
2041 deleteNotify(missile_target);
2042 if (collide_exempt)
2043 deleteNotify(collide_exempt);
2044 }
2045 else
2046 {
2047 missile_target = 0;
2048 collide_exempt = 0;
2049 }
2050}
2051
2052void afxMagicMissile::setChoreographer(afxChoreographer* chor)
2053{

Callers 2

launch_missile_sMethod · 0.80
launch_missile_cMethod · 0.80

Calls 2

setPositionFunction · 0.50
zeroMethod · 0.45

Tested by

no test coverage detected