mirror of
https://github.com/rehlds/reapi.git
synced 2024-12-27 23:25:30 +03:00
Add m_bCanShootOverride offset + update SDK (#160)
* Add m_bCanShootOverride offset + update SDK
This commit is contained in:
parent
1ef3c5a753
commit
b79c822fef
@ -1,3 +1,3 @@
|
||||
majorVersion=5
|
||||
minorVersion=12
|
||||
minorVersion=13
|
||||
maintenanceVersion=0
|
||||
|
@ -192,6 +192,7 @@
|
||||
#define PLAYER_HOLDING_SHIELD (1<<3)
|
||||
#define PLAYER_PREVENT_DUCK (1<<4)
|
||||
#define PLAYER_PREVENT_CLIMB (1<<5) // The player can't climb ladder
|
||||
#define PLAYER_PREVENT_JUMP (1<<6)
|
||||
|
||||
/**
|
||||
* Instant damage values for use with the 3rd parameter of the "Damage" client
|
||||
|
@ -2541,7 +2541,8 @@ enum CBasePlayer_Members
|
||||
m_iMapVote,
|
||||
|
||||
/*
|
||||
* Description: -
|
||||
* Description: The player can't shoot for freezetime period or during defuse bomb
|
||||
* @note This member isn't flexible, you can't override it for other behavior, so for this purpose use m_bCanShootOverride
|
||||
* Member type: bool
|
||||
* Get params: get_member(index, member);
|
||||
* Set params: set_member(index, member, bool:value);
|
||||
@ -4505,6 +4506,14 @@ enum CCSPlayer_Members
|
||||
* Set params: set_member(index, member, value);
|
||||
*/
|
||||
m_iWeaponInfiniteIds,
|
||||
|
||||
/*
|
||||
* Description: Forcing override for CBasePlayer::m_bCanShoot
|
||||
* Member type: bool
|
||||
* Get params: get_member(index, member);
|
||||
* Set params: set_member(index, member, bool:value);
|
||||
*/
|
||||
m_bCanShootOverride,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -31,9 +31,21 @@
|
||||
#include <API/CSPlayerItem.h>
|
||||
#include <API/CSPlayerWeapon.h>
|
||||
|
||||
enum WeaponInfiniteAmmoMode
|
||||
{
|
||||
WPNMODE_INFINITE_CLIP = 1,
|
||||
WPNMODE_INFINITE_BPAMMO
|
||||
};
|
||||
|
||||
class CCSPlayer: public CCSMonster {
|
||||
public:
|
||||
CCSPlayer() : m_bForceShowMenu(false), m_flRespawnPending(0), m_flSpawnProtectionEndTime(0)
|
||||
CCSPlayer() :
|
||||
m_bForceShowMenu(false),
|
||||
m_flRespawnPending(0),
|
||||
m_flSpawnProtectionEndTime(0),
|
||||
m_iWeaponInfiniteAmmo(0),
|
||||
m_iWeaponInfiniteIds(0),
|
||||
m_bCanShootOverride(false)
|
||||
{
|
||||
m_szModel[0] = '\0';
|
||||
}
|
||||
@ -47,7 +59,7 @@ public:
|
||||
virtual void GiveShield(bool bDeploy = true);
|
||||
virtual void DropShield(bool bDeploy = true);
|
||||
virtual void DropPlayerItem(const char *pszItemName);
|
||||
virtual void RemoveShield();
|
||||
virtual bool RemoveShield();
|
||||
virtual void RemoveAllItems(bool bRemoveSuit);
|
||||
virtual bool RemovePlayerItem(const char* pszItemName);
|
||||
virtual void SetPlayerModel(bool bHasC4);
|
||||
@ -84,6 +96,11 @@ public:
|
||||
virtual void RemoveSpawnProtection();
|
||||
virtual bool HintMessageEx(const char *pMessage, float duration = 6.0f, bool bDisplayIfPlayerDead = false, bool bOverride = false);
|
||||
|
||||
void Reset();
|
||||
|
||||
void OnSpawn();
|
||||
void OnKilled();
|
||||
|
||||
CBasePlayer *BasePlayer() const;
|
||||
|
||||
public:
|
||||
@ -95,6 +112,7 @@ public:
|
||||
};
|
||||
|
||||
EProtectionState GetProtectionState() const;
|
||||
bool CheckActivityInGame();
|
||||
|
||||
public:
|
||||
char m_szModel[32];
|
||||
@ -104,6 +122,7 @@ public:
|
||||
Vector m_vecOldvAngle;
|
||||
int m_iWeaponInfiniteAmmo;
|
||||
int m_iWeaponInfiniteIds;
|
||||
bool m_bCanShootOverride;
|
||||
};
|
||||
|
||||
// Inlines
|
||||
|
@ -71,6 +71,7 @@ const int DEFAULT_FOV = 90; // the default field of view
|
||||
#define PLAYER_HOLDING_SHIELD BIT(3)
|
||||
#define PLAYER_PREVENT_DUCK BIT(4)
|
||||
#define PLAYER_PREVENT_CLIMB BIT(5) // The player can't climb ladder
|
||||
#define PLAYER_PREVENT_JUMP BIT(6)
|
||||
|
||||
#define MENU_KEY_1 BIT(0)
|
||||
#define MENU_KEY_2 BIT(1)
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <API/CSInterfaces.h>
|
||||
|
||||
#define REGAMEDLL_API_VERSION_MAJOR 5
|
||||
#define REGAMEDLL_API_VERSION_MINOR 13
|
||||
#define REGAMEDLL_API_VERSION_MINOR 16
|
||||
|
||||
// CBasePlayer::Spawn hook
|
||||
typedef IHookChainClass<void, class CBasePlayer> IReGameHook_CBasePlayer_Spawn;
|
||||
@ -464,6 +464,10 @@ typedef IHookChainRegistryClass<bool, class CBasePlayerWeapon, int, int, float,
|
||||
typedef IHookChainClass<void, class CBasePlayer, const char *> IReGameHook_CBasePlayer_DropIdlePlayer;
|
||||
typedef IHookChainRegistryClass<void, class CBasePlayer, const char *> IReGameHookRegistry_CBasePlayer_DropIdlePlayer;
|
||||
|
||||
// CreateWeaponBox hook
|
||||
typedef IHookChain<class CWeaponBox *, class CBasePlayerItem *, class CBasePlayer *, const char *, Vector &, Vector &, Vector &, float, bool> IReGameHook_CreateWeaponBox;
|
||||
typedef IHookChainRegistry<class CWeaponBox *, class CBasePlayerItem *, class CBasePlayer *, const char *, Vector &, Vector &, Vector &, float, bool> IReGameHookRegistry_CreateWeaponBox;
|
||||
|
||||
class IReGameHookchains {
|
||||
public:
|
||||
virtual ~IReGameHookchains() {}
|
||||
@ -579,6 +583,7 @@ public:
|
||||
virtual IReGameHookRegistry_CBasePlayerWeapon_DefaultReload *CBasePlayerWeapon_DefaultReload() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayerWeapon_DefaultShotgunReload *CBasePlayerWeapon_DefaultShotgunReload() = 0;
|
||||
virtual IReGameHookRegistry_CBasePlayer_DropIdlePlayer *CBasePlayer_DropIdlePlayer() = 0;
|
||||
virtual IReGameHookRegistry_CreateWeaponBox *CreateWeaponBox() = 0;
|
||||
};
|
||||
|
||||
struct ReGameFuncs_t {
|
||||
|
@ -745,6 +745,7 @@ member_t memberlist_csplayer[] = {
|
||||
CSPL_MEMBERS(m_vecOldvAngle),
|
||||
CSPL_MEMBERS(m_iWeaponInfiniteAmmo),
|
||||
CSPL_MEMBERS(m_iWeaponInfiniteIds),
|
||||
CSPL_MEMBERS(m_bCanShootOverride),
|
||||
};
|
||||
|
||||
member_t memberlist_baseitem[] = {
|
||||
|
@ -743,6 +743,7 @@ enum CSPlayer_Members
|
||||
m_vecOldvAngle,
|
||||
m_iWeaponInfiniteAmmo,
|
||||
m_iWeaponInfiniteIds,
|
||||
m_bCanShootOverride,
|
||||
};
|
||||
|
||||
enum CBasePlayerItem_Members
|
||||
|
Loading…
Reference in New Issue
Block a user