mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +03:00
Implement RemoveAllItems hook (#960)
This commit is contained in:
parent
d5eb9c34d2
commit
0626800fbb
@ -335,6 +335,7 @@ GAMEHOOK_REGISTRY(CSGameRules_SendDeathMessage);
|
|||||||
|
|
||||||
GAMEHOOK_REGISTRY(CBasePlayer_PlayerDeathThink);
|
GAMEHOOK_REGISTRY(CBasePlayer_PlayerDeathThink);
|
||||||
GAMEHOOK_REGISTRY(CBasePlayer_Observer_Think);
|
GAMEHOOK_REGISTRY(CBasePlayer_Observer_Think);
|
||||||
|
GAMEHOOK_REGISTRY(CBasePlayer_RemoveAllItems);
|
||||||
|
|
||||||
int CReGameApi::GetMajorVersion() {
|
int CReGameApi::GetMajorVersion() {
|
||||||
return REGAMEDLL_API_VERSION_MAJOR;
|
return REGAMEDLL_API_VERSION_MAJOR;
|
||||||
|
@ -745,6 +745,10 @@ typedef IHookChainRegistryClassImpl<void, CBasePlayer> CReGameHookRegistry_CBase
|
|||||||
typedef IHookChainClassImpl<void, CBasePlayer> CReGameHook_CBasePlayer_Observer_Think;
|
typedef IHookChainClassImpl<void, CBasePlayer> CReGameHook_CBasePlayer_Observer_Think;
|
||||||
typedef IHookChainRegistryClassImpl<void, CBasePlayer> CReGameHookRegistry_CBasePlayer_Observer_Think;
|
typedef IHookChainRegistryClassImpl<void, CBasePlayer> CReGameHookRegistry_CBasePlayer_Observer_Think;
|
||||||
|
|
||||||
|
// CBasePlayer::RemoveAllItems hook
|
||||||
|
typedef IHookChainClassImpl<void, CBasePlayer, BOOL> CReGameHook_CBasePlayer_RemoveAllItems;
|
||||||
|
typedef IHookChainRegistryClassImpl<void, CBasePlayer, BOOL> CReGameHookRegistry_CBasePlayer_RemoveAllItems;
|
||||||
|
|
||||||
class CReGameHookchains: public IReGameHookchains {
|
class CReGameHookchains: public IReGameHookchains {
|
||||||
public:
|
public:
|
||||||
// CBasePlayer virtual
|
// CBasePlayer virtual
|
||||||
@ -905,6 +909,7 @@ public:
|
|||||||
|
|
||||||
CReGameHookRegistry_CBasePlayer_PlayerDeathThink m_CBasePlayer_PlayerDeathThink;
|
CReGameHookRegistry_CBasePlayer_PlayerDeathThink m_CBasePlayer_PlayerDeathThink;
|
||||||
CReGameHookRegistry_CBasePlayer_Observer_Think m_CBasePlayer_Observer_Think;
|
CReGameHookRegistry_CBasePlayer_Observer_Think m_CBasePlayer_Observer_Think;
|
||||||
|
CReGameHookRegistry_CBasePlayer_RemoveAllItems m_CBasePlayer_RemoveAllItems;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Spawn *CBasePlayer_Spawn();
|
virtual IReGameHookRegistry_CBasePlayer_Spawn *CBasePlayer_Spawn();
|
||||||
@ -1064,6 +1069,7 @@ public:
|
|||||||
|
|
||||||
virtual IReGameHookRegistry_CBasePlayer_PlayerDeathThink *CBasePlayer_PlayerDeathThink();
|
virtual IReGameHookRegistry_CBasePlayer_PlayerDeathThink *CBasePlayer_PlayerDeathThink();
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Observer_Think *CBasePlayer_Observer_Think();
|
virtual IReGameHookRegistry_CBasePlayer_Observer_Think *CBasePlayer_Observer_Think();
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_RemoveAllItems *CBasePlayer_RemoveAllItems();
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CReGameHookchains g_ReGameHookchains;
|
extern CReGameHookchains g_ReGameHookchains;
|
||||||
|
@ -1733,7 +1733,9 @@ void EXT_FUNC CBasePlayer::__API_HOOK(GiveDefaultItems)()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBasePlayer::RemoveAllItems(BOOL removeSuit)
|
LINK_HOOK_CLASS_VOID_CHAIN(CBasePlayer, RemoveAllItems, (BOOL removeSuit), removeSuit)
|
||||||
|
|
||||||
|
void EXT_FUNC CBasePlayer::__API_HOOK(RemoveAllItems)(BOOL removeSuit)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -448,6 +448,7 @@ public:
|
|||||||
edict_t *EntSelectSpawnPoint_OrigFunc();
|
edict_t *EntSelectSpawnPoint_OrigFunc();
|
||||||
void PlayerDeathThink_OrigFunc();
|
void PlayerDeathThink_OrigFunc();
|
||||||
void Observer_Think_OrigFunc();
|
void Observer_Think_OrigFunc();
|
||||||
|
void RemoveAllItems_OrigFunc(BOOL removeSuit);
|
||||||
|
|
||||||
CCSPlayer *CSPlayer() const;
|
CCSPlayer *CSPlayer() const;
|
||||||
#endif // REGAMEDLL_API
|
#endif // REGAMEDLL_API
|
||||||
|
@ -624,6 +624,10 @@ typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBa
|
|||||||
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Observer_Think;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Observer_Think;
|
||||||
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Observer_Think;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Observer_Think;
|
||||||
|
|
||||||
|
// CBasePlayer::RemoveAllItems hook
|
||||||
|
typedef IHookChainClass<void, class CBasePlayer, BOOL> IReGameHook_CBasePlayer_RemoveAllItems;
|
||||||
|
typedef IHookChainRegistryClass<void, class CBasePlayer, BOOL> IReGameHookRegistry_CBasePlayer_RemoveAllItems;
|
||||||
|
|
||||||
class IReGameHookchains {
|
class IReGameHookchains {
|
||||||
public:
|
public:
|
||||||
virtual ~IReGameHookchains() {}
|
virtual ~IReGameHookchains() {}
|
||||||
@ -785,6 +789,7 @@ public:
|
|||||||
|
|
||||||
virtual IReGameHookRegistry_CBasePlayer_PlayerDeathThink *CBasePlayer_PlayerDeathThink() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_PlayerDeathThink *CBasePlayer_PlayerDeathThink() = 0;
|
||||||
virtual IReGameHookRegistry_CBasePlayer_Observer_Think *CBasePlayer_Observer_Think() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_Observer_Think *CBasePlayer_Observer_Think() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_RemoveAllItems *CBasePlayer_RemoveAllItems() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ReGameFuncs_t {
|
struct ReGameFuncs_t {
|
||||||
|
Loading…
Reference in New Issue
Block a user