mirror of
https://github.com/rehlds/reapi.git
synced 2024-12-29 08:05:36 +03:00
API: PlayerDeathThink and Observer_Think (#301)
This commit is contained in:
parent
16afeded60
commit
016a08a58a
@ -914,6 +914,18 @@ enum GamedllFunc_CBasePlayer
|
|||||||
* Params: (const this)
|
* Params: (const this)
|
||||||
*/
|
*/
|
||||||
RG_CBasePlayer_EntSelectSpawnPoint,
|
RG_CBasePlayer_EntSelectSpawnPoint,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Description: -
|
||||||
|
* Params: (const this)
|
||||||
|
*/
|
||||||
|
RG_CBasePlayer_PlayerDeathThink,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Description: -
|
||||||
|
* Params: (const this)
|
||||||
|
*/
|
||||||
|
RG_CBasePlayer_Observer_Think,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -622,6 +622,10 @@ typedef IHookChainRegistry<void, class CBaseEntity *, class CBasePlayer *, class
|
|||||||
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_PlayerDeathThink;
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_PlayerDeathThink;
|
||||||
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_PlayerDeathThink;
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_PlayerDeathThink;
|
||||||
|
|
||||||
|
// CBasePlayer::Observer_Think hook
|
||||||
|
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Observer_Think;
|
||||||
|
typedef IHookChainRegistryClass<void, class CBasePlayer> IReGameHookRegistry_CBasePlayer_Observer_Think;
|
||||||
|
|
||||||
class IReGameHookchains {
|
class IReGameHookchains {
|
||||||
public:
|
public:
|
||||||
virtual ~IReGameHookchains() {}
|
virtual ~IReGameHookchains() {}
|
||||||
@ -782,6 +786,8 @@ public:
|
|||||||
virtual IReGameHookRegistry_CSGameRules_SendDeathMessage *CSGameRules_SendDeathMessage() = 0;
|
virtual IReGameHookRegistry_CSGameRules_SendDeathMessage *CSGameRules_SendDeathMessage() = 0;
|
||||||
|
|
||||||
virtual IReGameHookRegistry_CBasePlayer_PlayerDeathThink *CBasePlayer_PlayerDeathThink() = 0;
|
virtual IReGameHookRegistry_CBasePlayer_PlayerDeathThink *CBasePlayer_PlayerDeathThink() = 0;
|
||||||
|
virtual IReGameHookRegistry_CBasePlayer_Observer_Think *CBasePlayer_Observer_Think() = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ReGameFuncs_t {
|
struct ReGameFuncs_t {
|
||||||
|
@ -1710,6 +1710,25 @@ void CBasePlayerWeapon_SendWeaponAnim(IReGameHook_CBasePlayerWeapon_SendWeaponAn
|
|||||||
callVoidForward(RG_CBasePlayerWeapon_SendWeaponAnim, original, indexOfEdict(pthis->pev), iAnim, skiplocal);
|
callVoidForward(RG_CBasePlayerWeapon_SendWeaponAnim, original, indexOfEdict(pthis->pev), iAnim, skiplocal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CBasePlayer_PlayerDeathThink(IReGameHook_CBasePlayer_PlayerDeathThink *chain, CBasePlayer *pthis)
|
||||||
|
{
|
||||||
|
auto original = [chain](int _pthis)
|
||||||
|
{
|
||||||
|
chain->callNext(getPrivate<CBasePlayer>(_pthis));
|
||||||
|
};
|
||||||
|
|
||||||
|
callVoidForward(RG_CBasePlayer_PlayerDeathThink, original, indexOfEdict(pthis->pev));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CBasePlayer_Observer_Think(IReGameHook_CBasePlayer_Observer_Think *chain, CBasePlayer *pthis)
|
||||||
|
{
|
||||||
|
auto original = [chain](int _pthis)
|
||||||
|
{
|
||||||
|
chain->callNext(getPrivate<CBasePlayer>(_pthis));
|
||||||
|
};
|
||||||
|
|
||||||
|
callVoidForward(RG_CBasePlayer_Observer_Think, original, indexOfEdict(pthis->pev));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* VTC functions
|
* VTC functions
|
||||||
|
@ -558,6 +558,8 @@ edict_t *CBasePlayer_EntSelectSpawnPoint(IReGameHook_CBasePlayer_EntSelectSpawnP
|
|||||||
void CBasePlayerWeapon_ItemPostFrame(IReGameHook_CBasePlayerWeapon_ItemPostFrame *chain, CBasePlayerWeapon *pthis);
|
void CBasePlayerWeapon_ItemPostFrame(IReGameHook_CBasePlayerWeapon_ItemPostFrame *chain, CBasePlayerWeapon *pthis);
|
||||||
void CBasePlayerWeapon_KickBack(IReGameHook_CBasePlayerWeapon_KickBack *chain, CBasePlayerWeapon *pthis, float up_base, float lateral_base, float up_modifier, float lateral_modifier, float up_max, float lateral_max, int direction_change);
|
void CBasePlayerWeapon_KickBack(IReGameHook_CBasePlayerWeapon_KickBack *chain, CBasePlayerWeapon *pthis, float up_base, float lateral_base, float up_modifier, float lateral_modifier, float up_max, float lateral_max, int direction_change);
|
||||||
void CBasePlayerWeapon_SendWeaponAnim(IReGameHook_CBasePlayerWeapon_SendWeaponAnim *chain, CBasePlayerWeapon *pthis, int iAnim, int skiplocal);
|
void CBasePlayerWeapon_SendWeaponAnim(IReGameHook_CBasePlayerWeapon_SendWeaponAnim *chain, CBasePlayerWeapon *pthis, int iAnim, int skiplocal);
|
||||||
|
void CBasePlayer_PlayerDeathThink(IReGameHook_CBasePlayer_PlayerDeathThink *chain, CBasePlayer *pthis);
|
||||||
|
void CBasePlayer_Observer_Think(IReGameHook_CBasePlayer_Observer_Think *chain, CBasePlayer *pthis);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* VTC functions
|
* VTC functions
|
||||||
|
@ -212,6 +212,9 @@ hook_t hooklist_player[] = {
|
|||||||
|
|
||||||
DLL(CBasePlayer_CheckTimeBasedDamage),
|
DLL(CBasePlayer_CheckTimeBasedDamage),
|
||||||
DLL(CBasePlayer_EntSelectSpawnPoint),
|
DLL(CBasePlayer_EntSelectSpawnPoint),
|
||||||
|
|
||||||
|
DLL(CBasePlayer_PlayerDeathThink),
|
||||||
|
DLL(CBasePlayer_Observer_Think),
|
||||||
};
|
};
|
||||||
|
|
||||||
hook_t hooklist_gamerules[] = {
|
hook_t hooklist_gamerules[] = {
|
||||||
|
@ -236,6 +236,9 @@ enum GamedllFunc_CBasePlayer
|
|||||||
RG_CBasePlayer_CheckTimeBasedDamage,
|
RG_CBasePlayer_CheckTimeBasedDamage,
|
||||||
RG_CBasePlayer_EntSelectSpawnPoint,
|
RG_CBasePlayer_EntSelectSpawnPoint,
|
||||||
|
|
||||||
|
RG_CBasePlayer_PlayerDeathThink,
|
||||||
|
RG_CBasePlayer_Observer_Think,
|
||||||
|
|
||||||
// [...]
|
// [...]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user