diff --git a/reapi/src/entity_callback_dispatcher.cpp b/reapi/src/entity_callback_dispatcher.cpp index 18d574e..7127933 100644 --- a/reapi/src/entity_callback_dispatcher.cpp +++ b/reapi/src/entity_callback_dispatcher.cpp @@ -145,8 +145,6 @@ bool CEntityCallbackDispatcher::SetMoveDone(AMX *amx, CBaseEntity *pEntity, cons return false; } - m_callbacks.push_back(new EntityCallback(amx, pszCallback, fwdid, pEntity, pParams, iParamsLen, MoveDone)); - // Make sure that the entity actually inherited from CBaseToggle CBaseToggle *pEntityToggle = dynamic_cast(pEntity); if (!pEntityToggle) @@ -155,6 +153,7 @@ bool CEntityCallbackDispatcher::SetMoveDone(AMX *amx, CBaseEntity *pEntity, cons return false; } + m_callbacks.push_back(new EntityCallback(amx, pszCallback, fwdid, pEntity, pParams, iParamsLen, MoveDone)); pEntityToggle->SetMoveDone(&CBaseToggle::SUB_MoveDone); return true; }