mirror of
https://github.com/rehlds/reapi.git
synced 2024-12-26 22:55:29 +03:00
API: UpdateStatusBar
This commit is contained in:
parent
e5771ba16c
commit
492c865853
@ -940,6 +940,12 @@ enum GamedllFunc_CBasePlayer
|
||||
* Params: (const this, bool:removeSuit)
|
||||
*/
|
||||
RG_CBasePlayer_RemoveAllItems,
|
||||
|
||||
/*
|
||||
* Description: -
|
||||
* Params: (const this)
|
||||
*/
|
||||
RG_CBasePlayer_UpdateStatusBar,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -630,6 +630,10 @@ typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBa
|
||||
typedef IHookChainClass<void, class CBasePlayer, BOOL> IReGameHook_CBasePlayer_RemoveAllItems;
|
||||
typedef IHookChainRegistryClass<void, class CBasePlayer, BOOL> IReGameHookRegistry_CBasePlayer_RemoveAllItems;
|
||||
|
||||
// CBasePlayer::UpdateStatusBar hook
|
||||
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_UpdateStatusBar;
|
||||
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_UpdateStatusBar;
|
||||
|
||||
class IReGameHookchains {
|
||||
public:
|
||||
virtual ~IReGameHookchains() {}
|
||||
@ -792,6 +796,7 @@ public:
|
||||
virtual IReGameHookRegistry_CBasePlayer_PlayerDeathThink *CBasePlayer_PlayerDeathThink() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_Observer_Think *CBasePlayer_Observer_Think() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_RemoveAllItems *CBasePlayer_RemoveAllItems() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_UpdateStatusBar *CBasePlayer_UpdateStatusBar() = 0;
|
||||
};
|
||||
|
||||
struct ReGameFuncs_t {
|
||||
|
@ -1766,6 +1766,16 @@ void CSGameRules_SendDeathMessage(IReGameHook_CSGameRules_SendDeathMessage *chai
|
||||
callVoidForward(RG_CSGameRules_SendDeathMessage, original, indexOfPDataAmx(pKiller), indexOfEdict(pVictim->pev), indexOfPDataAmx(pAssister), indexOfEdictAmx(pevInflictor), killerWeaponName, iDeathMessageFlags, iRarityOfKill);
|
||||
}
|
||||
|
||||
void CBasePlayer_UpdateStatusBar(IReGameHook_CBasePlayer_UpdateStatusBar *chain, CBasePlayer *pthis)
|
||||
{
|
||||
auto original = [chain](int _pthis)
|
||||
{
|
||||
chain->callNext(getPrivate<CBasePlayer>(_pthis));
|
||||
};
|
||||
|
||||
callVoidForward(RG_CBasePlayer_UpdateStatusBar, original, indexOfEdict(pthis->pev));
|
||||
}
|
||||
|
||||
/*
|
||||
* VTC functions
|
||||
*/
|
||||
|
@ -566,6 +566,7 @@ void CBasePlayer_PlayerDeathThink(IReGameHook_CBasePlayer_PlayerDeathThink *chai
|
||||
void CBasePlayer_Observer_Think(IReGameHook_CBasePlayer_Observer_Think *chain, CBasePlayer *pthis);
|
||||
void CBasePlayer_RemoveAllItems(IReGameHook_CBasePlayer_RemoveAllItems *chain, CBasePlayer *pthis, BOOL removeSuit);
|
||||
void CSGameRules_SendDeathMessage(IReGameHook_CSGameRules_SendDeathMessage *chain, CBaseEntity *pKiller, CBasePlayer *pVictim, CBasePlayer *pAssister, entvars_t *pevInflictor, const char *killerWeaponName, int iDeathMessageFlags, int iRarityOfKill);
|
||||
void CBasePlayer_UpdateStatusBar(IReGameHook_CBasePlayer_UpdateStatusBar *chain, CBasePlayer *pthis);
|
||||
|
||||
/*
|
||||
* VTC functions
|
||||
|
@ -216,6 +216,7 @@ hook_t hooklist_player[] = {
|
||||
DLL(CBasePlayer_PlayerDeathThink),
|
||||
DLL(CBasePlayer_Observer_Think),
|
||||
DLL(CBasePlayer_RemoveAllItems),
|
||||
DLL(CBasePlayer_UpdateStatusBar),
|
||||
};
|
||||
|
||||
hook_t hooklist_gamerules[] = {
|
||||
|
@ -240,6 +240,7 @@ enum GamedllFunc_CBasePlayer
|
||||
RG_CBasePlayer_PlayerDeathThink,
|
||||
RG_CBasePlayer_Observer_Think,
|
||||
RG_CBasePlayer_RemoveAllItems,
|
||||
RG_CBasePlayer_UpdateStatusBar,
|
||||
|
||||
// [...]
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user