mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-14 15:48:01 +03:00
Added API hook HandleMenu_ChooseAppearance, HandleMenu_ChooseTeam
This commit is contained in:
parent
32d0c580dc
commit
61d9d64c19
@ -1369,7 +1369,9 @@ void BuyWeaponByWeaponID(CBasePlayer *pPlayer, WeaponIdType weaponID)
|
||||
}
|
||||
}
|
||||
|
||||
void HandleMenu_ChooseAppearance(CBasePlayer *player, int slot)
|
||||
LINK_HOOK_VOID_CHAIN(HandleMenu_ChooseAppearance, (CBasePlayer *player, int slot), player, slot);
|
||||
|
||||
void __API_HOOK(HandleMenu_ChooseAppearance)(CBasePlayer *player, int slot)
|
||||
{
|
||||
int numSkins = g_bIsCzeroGame ? CZ_NUM_SKIN : CS_NUM_SKIN;
|
||||
|
||||
@ -1524,9 +1526,11 @@ void HandleMenu_ChooseAppearance(CBasePlayer *player, int slot)
|
||||
}
|
||||
}
|
||||
|
||||
LINK_HOOK_CHAIN(BOOL, HandleMenu_ChooseTeam, (CBasePlayer *player, int slot), player, slot);
|
||||
|
||||
// returns true if the selection has been handled and the player's menu
|
||||
// can be closed...false if the menu should be displayed again
|
||||
BOOL HandleMenu_ChooseTeam(CBasePlayer *player, int slot)
|
||||
BOOL __API_HOOK(HandleMenu_ChooseTeam)(CBasePlayer *player, int slot)
|
||||
{
|
||||
int oldTeam;
|
||||
char *szOldTeam;
|
||||
|
@ -141,7 +141,9 @@ void BuyRifle(CBasePlayer *pPlayer, int iSlot);
|
||||
void BuyMachineGun(CBasePlayer *pPlayer, int iSlot);
|
||||
void BuyItem(CBasePlayer *pPlayer, int iSlot);
|
||||
void HandleMenu_ChooseAppearance(CBasePlayer *player, int slot);
|
||||
void HandleMenu_ChooseAppearance_(CBasePlayer *player, int slot);
|
||||
BOOL HandleMenu_ChooseTeam(CBasePlayer *player, int slot);
|
||||
BOOL HandleMenu_ChooseTeam_(CBasePlayer *player, int slot);
|
||||
void Radio1(CBasePlayer *player, int slot);
|
||||
void Radio2(CBasePlayer *player, int slot);
|
||||
void Radio3(CBasePlayer *player, int slot);
|
||||
|
@ -194,6 +194,14 @@ typedef IVoidHookChainRegistry<struct playermove_s *, int> IReGameHookRegistry_P
|
||||
typedef IVoidHookChain<int> IReGameHook_PM_AirMove;
|
||||
typedef IVoidHookChainRegistry<int> IReGameHookRegistry_PM_AirMove;
|
||||
|
||||
// HandleMenu_ChooseAppearance hook
|
||||
typedef IVoidHookChain<class CBasePlayer *, int> IReGameHook_HandleMenu_ChooseAppearance;
|
||||
typedef IVoidHookChainRegistry<class CBasePlayer *, int> IReGameHookRegistry_HandleMenu_ChooseAppearance;
|
||||
|
||||
// HandleMenu_ChooseTeam hook
|
||||
typedef IHookChain<BOOL, class CBasePlayer *, int> IReGameHook_HandleMenu_ChooseTeam;
|
||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *, int> IReGameHookRegistry_HandleMenu_ChooseTeam;
|
||||
|
||||
// CHalfLifeMultiplay::FShouldSwitchWeapon hook
|
||||
typedef IHookChain<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHook_CSGameRules_FShouldSwitchWeapon;
|
||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon;
|
||||
@ -326,6 +334,8 @@ public:
|
||||
virtual IReGameHookRegistry_PM_Init* PM_Init() = 0;
|
||||
virtual IReGameHookRegistry_PM_Move* PM_Move() = 0;
|
||||
virtual IReGameHookRegistry_PM_AirMove* PM_AirMove() = 0;
|
||||
virtual IReGameHookRegistry_HandleMenu_ChooseAppearance* HandleMenu_ChooseAppearance() = 0;
|
||||
virtual IReGameHookRegistry_HandleMenu_ChooseTeam* HandleMenu_ChooseTeam() = 0;
|
||||
|
||||
virtual IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon* CSGameRules_FShouldSwitchWeapon() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_GetNextBestWeapon* CSGameRules_GetNextBestWeapon() = 0;
|
||||
|
@ -194,6 +194,14 @@ typedef IVoidHookChainRegistry<struct playermove_s *, int> IReGameHookRegistry_P
|
||||
typedef IVoidHookChain<int> IReGameHook_PM_AirMove;
|
||||
typedef IVoidHookChainRegistry<int> IReGameHookRegistry_PM_AirMove;
|
||||
|
||||
// HandleMenu_ChooseAppearance hook
|
||||
typedef IVoidHookChain<class CBasePlayer *, int> IReGameHook_HandleMenu_ChooseAppearance;
|
||||
typedef IVoidHookChainRegistry<class CBasePlayer *, int> IReGameHookRegistry_HandleMenu_ChooseAppearance;
|
||||
|
||||
// HandleMenu_ChooseTeam hook
|
||||
typedef IHookChain<BOOL, class CBasePlayer *, int> IReGameHook_HandleMenu_ChooseTeam;
|
||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *, int> IReGameHookRegistry_HandleMenu_ChooseTeam;
|
||||
|
||||
// CHalfLifeMultiplay::FShouldSwitchWeapon hook
|
||||
typedef IHookChain<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHook_CSGameRules_FShouldSwitchWeapon;
|
||||
typedef IHookChainRegistry<BOOL, class CBasePlayer *, class CBasePlayerItem *> IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon;
|
||||
@ -326,6 +334,8 @@ public:
|
||||
virtual IReGameHookRegistry_PM_Init* PM_Init() = 0;
|
||||
virtual IReGameHookRegistry_PM_Move* PM_Move() = 0;
|
||||
virtual IReGameHookRegistry_PM_AirMove* PM_AirMove() = 0;
|
||||
virtual IReGameHookRegistry_HandleMenu_ChooseAppearance* HandleMenu_ChooseAppearance() = 0;
|
||||
virtual IReGameHookRegistry_HandleMenu_ChooseTeam* HandleMenu_ChooseTeam() = 0;
|
||||
|
||||
virtual IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon* CSGameRules_FShouldSwitchWeapon() = 0;
|
||||
virtual IReGameHookRegistry_CSGameRules_GetNextBestWeapon* CSGameRules_GetNextBestWeapon() = 0;
|
||||
|
@ -91,6 +91,8 @@ IReGameHookRegistry_InstallGameRules* CReGameHookchains::InstallGameRules() { re
|
||||
IReGameHookRegistry_PM_Init* CReGameHookchains::PM_Init() { return &m_PM_Init; }
|
||||
IReGameHookRegistry_PM_Move* CReGameHookchains::PM_Move() { return &m_PM_Move; }
|
||||
IReGameHookRegistry_PM_AirMove* CReGameHookchains::PM_AirMove() { return &m_PM_AirMove; }
|
||||
IReGameHookRegistry_HandleMenu_ChooseAppearance* CReGameHookchains::HandleMenu_ChooseAppearance() { return &m_HandleMenu_ChooseAppearance; }
|
||||
IReGameHookRegistry_HandleMenu_ChooseTeam* CReGameHookchains::HandleMenu_ChooseTeam() { return &m_HandleMenu_ChooseTeam; }
|
||||
|
||||
IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon* CReGameHookchains::CSGameRules_FShouldSwitchWeapon() { return &m_CSGameRules_FShouldSwitchWeapon; }
|
||||
IReGameHookRegistry_CSGameRules_GetNextBestWeapon* CReGameHookchains::CSGameRules_GetNextBestWeapon() { return &m_CSGameRules_GetNextBestWeapon; }
|
||||
|
@ -188,6 +188,14 @@ typedef IVoidHookChainRegistryImpl<struct playermove_s *, int> CReGameHookRegist
|
||||
typedef IVoidHookChainImpl<int> CReGameHook_PM_AirMove;
|
||||
typedef IVoidHookChainRegistryImpl<int> CReGameHookRegistry_PM_AirMove;
|
||||
|
||||
// HandleMenu_ChooseAppearance hook
|
||||
typedef IVoidHookChainImpl<CBasePlayer *, int> CReGameHook_HandleMenu_ChooseAppearance;
|
||||
typedef IVoidHookChainRegistryImpl<CBasePlayer *, int> CReGameHookRegistry_HandleMenu_ChooseAppearance;
|
||||
|
||||
// HandleMenu_ChooseTeam hook
|
||||
typedef IHookChainImpl<BOOL, CBasePlayer *, int> CReGameHook_HandleMenu_ChooseTeam;
|
||||
typedef IHookChainRegistryImpl<BOOL, CBasePlayer *, int> CReGameHookRegistry_HandleMenu_ChooseTeam;
|
||||
|
||||
// CHalfLifeMultiplay::FShouldSwitchWeapon hook
|
||||
typedef IHookChainClassImpl<BOOL, class CHalfLifeMultiplay, CBasePlayer *, CBasePlayerItem *> CReGameHook_CSGameRules_FShouldSwitchWeapon;
|
||||
typedef IHookChainRegistryClassEmptyImpl<BOOL, class CHalfLifeMultiplay, CBasePlayer *, CBasePlayerItem *> CReGameHookRegistry_CSGameRules_FShouldSwitchWeapon;
|
||||
@ -320,6 +328,8 @@ public:
|
||||
CReGameHookRegistry_PM_Init m_PM_Init;
|
||||
CReGameHookRegistry_PM_Move m_PM_Move;
|
||||
CReGameHookRegistry_PM_AirMove m_PM_AirMove;
|
||||
CReGameHookRegistry_HandleMenu_ChooseAppearance m_HandleMenu_ChooseAppearance;
|
||||
CReGameHookRegistry_HandleMenu_ChooseTeam m_HandleMenu_ChooseTeam;
|
||||
|
||||
CReGameHookRegistry_CSGameRules_FShouldSwitchWeapon m_CSGameRules_FShouldSwitchWeapon;
|
||||
CReGameHookRegistry_CSGameRules_GetNextBestWeapon m_CSGameRules_GetNextBestWeapon;
|
||||
@ -386,6 +396,8 @@ public:
|
||||
virtual IReGameHookRegistry_PM_Init* PM_Init();
|
||||
virtual IReGameHookRegistry_PM_Move* PM_Move();
|
||||
virtual IReGameHookRegistry_PM_AirMove* PM_AirMove();
|
||||
virtual IReGameHookRegistry_HandleMenu_ChooseAppearance* HandleMenu_ChooseAppearance();
|
||||
virtual IReGameHookRegistry_HandleMenu_ChooseTeam* HandleMenu_ChooseTeam();
|
||||
|
||||
virtual IReGameHookRegistry_CSGameRules_FShouldSwitchWeapon* CSGameRules_FShouldSwitchWeapon();
|
||||
virtual IReGameHookRegistry_CSGameRules_GetNextBestWeapon* CSGameRules_GetNextBestWeapon();
|
||||
|
Loading…
x
Reference in New Issue
Block a user