| 2011 | // public: |
| 2012 | |
| 2013 | void 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 | |
| 2052 | void afxMagicMissile::setChoreographer(afxChoreographer* chor) |
| 2053 | { |
no test coverage detected