MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / uninit

Method uninit

source/game/items/StarActiveItem.cpp:96–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void 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
122void ActiveItem::update(float dt, FireMode fireMode, bool shifting, HashSet<MoveControlType> const& moves) {
123 StringMap<bool> moveMap;

Callers

nothing calls this directly

Calls 5

removeCallbacksMethod · 0.80
isClientMethod · 0.80
stopAudioMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected