| 94 | } |
| 95 | |
| 96 | void ActiveItem::uninit() { |
| 97 | if (entityMode() == EntityMode::Master) { |
| 98 | m_script.uninit(); |
| 99 | m_script.removeCallbacks("activeItem"); |
| 100 | m_script.removeCallbacks("item"); |
| 101 | m_script.removeCallbacks("config"); |
| 102 | m_script.removeCallbacks("animator"); |
| 103 | m_script.removeCallbacks("status"); |
| 104 | m_script.removeActorMovementCallbacks(); |
| 105 | m_script.removeCallbacks("player"); |
| 106 | m_script.removeCallbacks("entity"); |
| 107 | } |
| 108 | if (world()->isClient()) { |
| 109 | if (auto animationScripts = instanceValue("animationScripts")) { |
| 110 | m_scriptedAnimator.uninit(); |
| 111 | m_scriptedAnimator.removeCallbacks("animationConfig"); |
| 112 | m_scriptedAnimator.removeCallbacks("activeItemAnimation"); |
| 113 | m_scriptedAnimator.removeCallbacks("config"); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | m_itemAnimatorDynamicTarget.stopAudio(); |
| 118 | ToolUserItem::uninit(); |
| 119 | m_activeAudio.clear(); |
| 120 | } |
| 121 | |
| 122 | void ActiveItem::update(float dt, FireMode fireMode, bool shifting, HashSet<MoveControlType> const& moves) { |
| 123 | StringMap<bool> moveMap; |
nothing calls this directly
no test coverage detected