Skip to content

Commit

Permalink
Fix SetMoveDone callback dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Sep 3, 2023
1 parent 2b8ae61 commit eab1658
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions reapi/src/entity_callback_dispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CBaseToggle *>(pEntity);
if (!pEntityToggle)
Expand All @@ -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;
}
Expand Down

0 comments on commit eab1658

Please sign in to comment.