mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +03:00
Added api hook CBasePlayer::DropPlayerItem
This commit is contained in:
parent
f071682392
commit
a1e7b9dae5
@ -7300,7 +7300,9 @@ void CBasePlayer::UpdateStatusBar()
|
||||
}
|
||||
}
|
||||
|
||||
void CBasePlayer::DropPlayerItem(const char *pszItemName)
|
||||
LINK_HOOK_CLASS_VOID_CHAIN(CBasePlayer, DropPlayerItem, (const char *pszItemName), pszItemName);
|
||||
|
||||
void CBasePlayer::__API_HOOK(DropPlayerItem)(const char *pszItemName)
|
||||
{
|
||||
if (!Q_strlen(pszItemName))
|
||||
{
|
||||
|
@ -493,6 +493,7 @@ public:
|
||||
void StartObserver(Vector vecPosition, Vector vecViewAngle);
|
||||
void HandleSignals();
|
||||
void DropPlayerItem(const char *pszItemName);
|
||||
void DropPlayerItem_(const char *pszItemName);
|
||||
BOOL HasPlayerItem(CBasePlayerItem *pCheckItem);
|
||||
BOOL HasNamedPlayerItem(const char *pszItemName);
|
||||
BOOL HasWeapons();
|
||||
|
@ -93,6 +93,7 @@ extern globalvars_t *gpGlobals;
|
||||
#define SND_CHANGE_VOL (1<<6) // duplicated in protocol.h change sound vol
|
||||
#define SND_CHANGE_PITCH (1<<7) // duplicated in protocol.h change sound pitch
|
||||
|
||||
// All monsters need this data
|
||||
#define DONT_BLEED -1
|
||||
#define BLOOD_COLOR_RED (byte)247
|
||||
#define BLOOD_COLOR_YELLOW (byte)195
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "interface.h"
|
||||
#include "player.h"
|
||||
#include "gamerules.h"
|
||||
#include "client.h"
|
||||
|
||||
#define REGAMEDLL_API_VERSION_MAJOR 3
|
||||
#define REGAMEDLL_API_VERSION_MINOR 1
|
||||
@ -124,7 +125,6 @@ typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBase
|
||||
typedef IVoidHookChainClass<class CBasePlayer, float, float, float, int> IReGameHook_CBasePlayer_Blind;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, float, float, float, int> IReGameHookRegistry_CBasePlayer_Blind;
|
||||
|
||||
|
||||
// CBasePlayer::Observer_IsValidTarget hook
|
||||
typedef IHookChainClass<class CBasePlayer *, class CBasePlayer, int, bool> IReGameHook_CBasePlayer_Observer_IsValidTarget;
|
||||
typedef IHookChainRegistryClass<class CBasePlayer *, class CBasePlayer, int, bool> IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget;
|
||||
@ -305,6 +305,10 @@ typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_BalanceTeams;
|
||||
typedef IHookChain<bool, class CBasePlayer *, BuyItemID> IReGameHook_CanBuyThisItem;
|
||||
typedef IHookChainRegistry<bool, class CBasePlayer *, BuyItemID> IReGameHookRegistry_CanBuyThisItem;
|
||||
|
||||
// CBasePlayer::DropPlayerItem hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, const char *> IReGameHook_CBasePlayer_DropPlayerItem;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, const char *> IReGameHookRegistry_CBasePlayer_DropPlayerItem;
|
||||
|
||||
class IReGameHookchains {
|
||||
public:
|
||||
virtual ~IReGameHookchains() {}
|
||||
@ -380,6 +384,7 @@ public:
|
||||
virtual IReGameHookRegistry_CSGameRules_BalanceTeams* CSGameRules_BalanceTeams() = 0;
|
||||
|
||||
virtual IReGameHookRegistry_CanBuyThisItem* CanBuyThisItem() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_DropPlayerItem* CBasePlayer_DropPlayerItem() = 0;
|
||||
};
|
||||
|
||||
struct ReGameFuncs_t {
|
||||
|
@ -57,6 +57,7 @@ extern globalvars_t *gpGlobals;
|
||||
#define SND_CHANGE_VOL (1<<6) // duplicated in protocol.h change sound vol
|
||||
#define SND_CHANGE_PITCH (1<<7) // duplicated in protocol.h change sound pitch
|
||||
|
||||
// All monsters need this data
|
||||
#define DONT_BLEED -1
|
||||
#define BLOOD_COLOR_RED (byte)247
|
||||
#define BLOOD_COLOR_YELLOW (byte)195
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "interface.h"
|
||||
#include "player.h"
|
||||
#include "gamerules.h"
|
||||
#include "client.h"
|
||||
|
||||
#define REGAMEDLL_API_VERSION_MAJOR 3
|
||||
#define REGAMEDLL_API_VERSION_MINOR 1
|
||||
@ -124,7 +125,6 @@ typedef IVoidHookChainRegistryClass<class CBasePlayer> IReGameHookRegistry_CBase
|
||||
typedef IVoidHookChainClass<class CBasePlayer, float, float, float, int> IReGameHook_CBasePlayer_Blind;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, float, float, float, int> IReGameHookRegistry_CBasePlayer_Blind;
|
||||
|
||||
|
||||
// CBasePlayer::Observer_IsValidTarget hook
|
||||
typedef IHookChainClass<class CBasePlayer *, class CBasePlayer, int, bool> IReGameHook_CBasePlayer_Observer_IsValidTarget;
|
||||
typedef IHookChainRegistryClass<class CBasePlayer *, class CBasePlayer, int, bool> IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget;
|
||||
@ -305,6 +305,10 @@ typedef IVoidHookChainRegistry<> IReGameHookRegistry_CSGameRules_BalanceTeams;
|
||||
typedef IHookChain<bool, class CBasePlayer *, BuyItemID> IReGameHook_CanBuyThisItem;
|
||||
typedef IHookChainRegistry<bool, class CBasePlayer *, BuyItemID> IReGameHookRegistry_CanBuyThisItem;
|
||||
|
||||
// CBasePlayer::DropPlayerItem hook
|
||||
typedef IVoidHookChainClass<class CBasePlayer, const char *> IReGameHook_CBasePlayer_DropPlayerItem;
|
||||
typedef IVoidHookChainRegistryClass<class CBasePlayer, const char *> IReGameHookRegistry_CBasePlayer_DropPlayerItem;
|
||||
|
||||
class IReGameHookchains {
|
||||
public:
|
||||
virtual ~IReGameHookchains() {}
|
||||
@ -380,6 +384,7 @@ public:
|
||||
virtual IReGameHookRegistry_CSGameRules_BalanceTeams* CSGameRules_BalanceTeams() = 0;
|
||||
|
||||
virtual IReGameHookRegistry_CanBuyThisItem* CanBuyThisItem() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_DropPlayerItem* CBasePlayer_DropPlayerItem() = 0;
|
||||
};
|
||||
|
||||
struct ReGameFuncs_t {
|
||||
|
@ -115,6 +115,7 @@ IReGameHookRegistry_CSGameRules_GoToIntermission* CReGameHookchains::CSGameRules
|
||||
IReGameHookRegistry_CSGameRules_BalanceTeams* CReGameHookchains::CSGameRules_BalanceTeams() { return &m_CSGameRules_BalanceTeams; }
|
||||
|
||||
IReGameHookRegistry_CanBuyThisItem* CReGameHookchains::CanBuyThisItem() { return &m_CanBuyThisItem; }
|
||||
IReGameHookRegistry_CBasePlayer_DropPlayerItem* CReGameHookchains::CBasePlayer_DropPlayerItem() { return &m_CBasePlayer_DropPlayerItem; }
|
||||
|
||||
int CReGameApi::GetMajorVersion()
|
||||
{
|
||||
|
@ -300,6 +300,10 @@ typedef IVoidHookChainRegistryClassEmptyImpl<class CHalfLifeMultiplay> CReGameHo
|
||||
typedef IHookChainImpl<bool, class CBasePlayer *, BuyItemID> CReGameHook_CanBuyThisItem;
|
||||
typedef IHookChainRegistryImpl<bool, class CBasePlayer *, BuyItemID> CReGameHookRegistry_CanBuyThisItem;
|
||||
|
||||
// CBasePlayer::DropPlayerItem hook
|
||||
typedef IVoidHookChainClassImpl<CBasePlayer, const char *> CReGameHook_CBasePlayer_DropPlayerItem;
|
||||
typedef IVoidHookChainRegistryClassImpl<CBasePlayer, const char *> CReGameHookRegistry_CBasePlayer_DropPlayerItem;
|
||||
|
||||
class CReGameHookchains: public IReGameHookchains {
|
||||
public:
|
||||
// CBasePlayer virtual
|
||||
@ -374,6 +378,7 @@ public:
|
||||
CReGameHookRegistry_CSGameRules_BalanceTeams m_CSGameRules_BalanceTeams;
|
||||
|
||||
CReGameHookRegistry_CanBuyThisItem m_CanBuyThisItem;
|
||||
CReGameHookRegistry_CBasePlayer_DropPlayerItem m_CBasePlayer_DropPlayerItem;
|
||||
|
||||
public:
|
||||
virtual IReGameHookRegistry_CBasePlayer_Spawn* CBasePlayer_Spawn();
|
||||
@ -447,6 +452,7 @@ public:
|
||||
virtual IReGameHookRegistry_CSGameRules_BalanceTeams* CSGameRules_BalanceTeams();
|
||||
|
||||
virtual IReGameHookRegistry_CanBuyThisItem* CanBuyThisItem();
|
||||
virtual IReGameHookRegistry_CBasePlayer_DropPlayerItem* CBasePlayer_DropPlayerItem();
|
||||
};
|
||||
|
||||
extern CReGameHookchains g_ReGameHookchains;
|
||||
|
Loading…
Reference in New Issue
Block a user