mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-26 22:55:41 +03:00
Implement CBasePlayer::Observer_SetMode hook (#663)
Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
This commit is contained in:
parent
67cc153f5d
commit
f1b253e5b0
@ -186,6 +186,8 @@ GAMEHOOK_REGISTRY(CBaseEntity_FireBullets);
|
||||
GAMEHOOK_REGISTRY(CBaseEntity_FireBuckshots);
|
||||
GAMEHOOK_REGISTRY(CBaseEntity_FireBullets3);
|
||||
|
||||
GAMEHOOK_REGISTRY(CBasePlayer_Observer_SetMode);
|
||||
|
||||
GAMEHOOK_REGISTRY(CBasePlayer_Pain);
|
||||
GAMEHOOK_REGISTRY(CBasePlayer_DeathSound);
|
||||
GAMEHOOK_REGISTRY(CBasePlayer_JoiningThink);
|
||||
|
@ -621,6 +621,10 @@ typedef IHookChainRegistryClassImpl<void, class CBaseEntity, ULONG, Vector &, Ve
|
||||
typedef IHookChainClassImpl<Vector &, class CBaseEntity, Vector &, Vector &, float, float, int, int, int, float, entvars_t *, bool, int> CReGameHook_CBaseEntity_FireBullets3;
|
||||
typedef IHookChainRegistryClassImpl<Vector &, class CBaseEntity, Vector &, Vector &, float, float, int, int, int, float, entvars_t *, bool, int> CReGameHookRegistry_CBaseEntity_FireBullets3;
|
||||
|
||||
// CBasePlayer::Observer_SetMode hook
|
||||
typedef IHookChainClassImpl<void, CBasePlayer, int> CReGameHook_CBasePlayer_Observer_SetMode;
|
||||
typedef IHookChainRegistryClassImpl<void, CBasePlayer, int> CReGameHookRegistry_CBasePlayer_Observer_SetMode;
|
||||
|
||||
// CBasePlayer::Pain hook
|
||||
typedef IHookChainClassImpl<void, CBasePlayer, int, bool> CReGameHook_CBasePlayer_Pain;
|
||||
typedef IHookChainRegistryClassImpl<void, CBasePlayer, int, bool> CReGameHookRegistry_CBasePlayer_Pain;
|
||||
@ -758,7 +762,9 @@ public:
|
||||
CReGameHookRegistry_CBaseEntity_FireBullets m_CBaseEntity_FireBullets;
|
||||
CReGameHookRegistry_CBaseEntity_FireBuckshots m_CBaseEntity_FireBuckshots;
|
||||
CReGameHookRegistry_CBaseEntity_FireBullets3 m_CBaseEntity_FireBullets3;
|
||||
|
||||
|
||||
CReGameHookRegistry_CBasePlayer_Observer_SetMode m_CBasePlayer_Observer_SetMode;
|
||||
|
||||
CReGameHookRegistry_CBasePlayer_Pain m_CBasePlayer_Pain;
|
||||
CReGameHookRegistry_CBasePlayer_DeathSound m_CBasePlayer_DeathSound;
|
||||
CReGameHookRegistry_CBasePlayer_JoiningThink m_CBasePlayer_JoiningThink;
|
||||
@ -886,7 +892,9 @@ public:
|
||||
virtual IReGameHookRegistry_CBaseEntity_FireBullets *CBaseEntity_FireBullets();
|
||||
virtual IReGameHookRegistry_CBaseEntity_FireBuckshots *CBaseEntity_FireBuckshots();
|
||||
virtual IReGameHookRegistry_CBaseEntity_FireBullets3 *CBaseEntity_FireBullets3();
|
||||
|
||||
|
||||
virtual IReGameHookRegistry_CBasePlayer_Observer_SetMode *CBasePlayer_Observer_SetMode();
|
||||
|
||||
virtual IReGameHookRegistry_CBasePlayer_Pain *CBasePlayer_Pain();
|
||||
virtual IReGameHookRegistry_CBasePlayer_DeathSound *CBasePlayer_DeathSound();
|
||||
virtual IReGameHookRegistry_CBasePlayer_JoiningThink *CBasePlayer_JoiningThink();
|
||||
|
@ -443,7 +443,9 @@ void CBasePlayer::Observer_CheckProperties()
|
||||
}
|
||||
|
||||
// Attempt to change the observer mode
|
||||
void CBasePlayer::Observer_SetMode(int iMode)
|
||||
LINK_HOOK_CLASS_VOID_CHAIN(CBasePlayer, Observer_SetMode, (int iMode), iMode)
|
||||
|
||||
void EXT_FUNC CBasePlayer::__API_HOOK(Observer_SetMode)(int iMode)
|
||||
{
|
||||
int forcecamera;
|
||||
int oldMode;
|
||||
|
@ -439,6 +439,7 @@ public:
|
||||
bool HintMessageEx_OrigFunc(const char *pMessage, float duration = 6.0f, bool bDisplayIfPlayerDead = false, bool bOverride = false);
|
||||
void UseEmpty_OrigFunc();
|
||||
void DropIdlePlayer_OrigFunc(const char *reason);
|
||||
void Observer_SetMode_OrigFunc(int iMode);
|
||||
void Pain_OrigFunc(int iLastHitGroup, bool bHasArmour);
|
||||
void DeathSound_OrigFunc();
|
||||
void JoiningThink_OrigFunc();
|
||||
|
@ -500,6 +500,10 @@ typedef IHookChainRegistryClass<void, class CBaseEntity, ULONG, Vector &, Vector
|
||||
typedef IHookChainClass<Vector &, class CBaseEntity, Vector &, Vector &, float, float, int, int, int, float, entvars_t *, bool, int> IReGameHook_CBaseEntity_FireBullets3;
|
||||
typedef IHookChainRegistryClass<Vector &, class CBaseEntity, Vector &, Vector &, float, float, int, int, int, float, entvars_t *, bool, int> IReGameHookRegistry_CBaseEntity_FireBullets3;
|
||||
|
||||
// CBasePlayer::Observer_SetMode hook
|
||||
typedef IHookChainClass<void, class CBasePlayer, int> IReGameHook_CBasePlayer_Observer_SetMode;
|
||||
typedef IHookChainRegistryClass<void, class CBasePlayer, int> IReGameHookRegistry_CBasePlayer_Observer_SetMode;
|
||||
|
||||
// CBasePlayer::Pain hook
|
||||
typedef IHookChainClass<void, class CBasePlayer, int, bool> IReGameHook_CBasePlayer_Pain;
|
||||
typedef IHookChainRegistryClass<void, class CBasePlayer, int, bool> IReGameHookRegistry_CBasePlayer_Pain;
|
||||
@ -638,7 +642,9 @@ public:
|
||||
virtual IReGameHookRegistry_CBaseEntity_FireBullets *CBaseEntity_FireBullets() = 0;
|
||||
virtual IReGameHookRegistry_CBaseEntity_FireBuckshots *CBaseEntity_FireBuckshots() = 0;
|
||||
virtual IReGameHookRegistry_CBaseEntity_FireBullets3 *CBaseEntity_FireBullets3() = 0;
|
||||
|
||||
|
||||
virtual IReGameHookRegistry_CBasePlayer_Observer_SetMode *CBasePlayer_Observer_SetMode() = 0;
|
||||
|
||||
virtual IReGameHookRegistry_CBasePlayer_Pain *CBasePlayer_Pain() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_DeathSound *CBasePlayer_DeathSound() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_JoiningThink *CBasePlayer_JoiningThink() = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user