Skip to content

Commit

Permalink
add hook for spray uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
wootguy committed Nov 11, 2024
1 parent 3bea052 commit 23c8a38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dlls/hooks/PluginHooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ struct HLCOOP_PLUGIN_HOOKS {

// called before voice data is sent to a player. Set mute to true to block the message to the receiver
HOOK_RETURN_DATA (*pfnSendVoiceData)(int senderidx, int receiveridx, uint8_t* data, int sz, bool& mute);

// called before the mod processes a newly uploaded customization (tempdecal.wad spray)
HOOK_RETURN_DATA (*pfnPlayerCustomization)(edict_t* pEntity, customization_t* pCust);
};

EXPORT void RegisterPlugin(void* plugin, HLCOOP_PLUGIN_HOOKS* hooks, const char* name);
Expand Down
2 changes: 2 additions & 0 deletions dlls/hooks/hlds_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,8 @@ animation right now.
*/
void PlayerCustomization( edict_t *pEntity, customization_t *pCust )
{
CALL_HOOKS_VOID(pfnPlayerCustomization, pEntity, pCust);

CBasePlayer *pPlayer = (CBasePlayer *)GET_PRIVATE(pEntity);

if (!pPlayer)
Expand Down

0 comments on commit 23c8a38

Please sign in to comment.