Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: CSPlayer and CKnife additions + headers refactory #277

Merged
merged 12 commits into from
Jul 15, 2023
Merged
34 changes: 29 additions & 5 deletions reapi/extra/amxmodx/scripting/include/reapi_gamedll_const.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4656,6 +4656,22 @@ enum CCSPlayer_Members
* Set params: set_member(index, member, bool:value);
*/
m_bMegaBunnyJumping,

/*
* Description: -
* Member type: bool
* Get params: get_member(index, member);
* Set params: set_member(index, member, bool:value);
*/
m_bPlantC4Anywhere,

/*
* Description: -
* Member type: bool
* Get params: get_member(index, member);
* Set params: set_member(index, member, bool:value);
*/
m_bSpawnProtectionEffects,
};

/**
Expand Down Expand Up @@ -5950,44 +5966,52 @@ enum CKnife_Members
m_Knife_usKnife,

/*
* Description: -
* Description: Stab damage (default: 65.0)
* Member type: float
* Get params: get_member(index, member);
* Set params: set_member(index, member, value);
*/
m_Knife_flStabBaseDamage,

/*
* Description: -
* Description: Swing damage (default: 15.0)
* Member type: float
* Get params: get_member(index, member);
* Set params: set_member(index, member, value);
*/
m_Knife_flSwingBaseDamage,

/*
* Description: -
* Description: Fast Swing (first one) damage (default: 20.0)
* Member type: float
* Get params: get_member(index, member);
* Set params: set_member(index, member, value);
*/
m_Knife_flSwingBaseDamage_Fast,

/*
* Description: -
* Description: Stab distance (default: 32.0)
* Member type: float
* Get params: get_member(index, member);
* Set params: set_member(index, member, value);
*/
m_Knife_flStabDistance,

/*
* Description: -
* Description: Swing distance (default: 64.0)
* Member type: float
* Get params: get_member(index, member);
* Set params: set_member(index, member, value);
*/
m_Knife_flSwingDistance,

/*
* Description: Back Stab damage multiplier (default: 3.0)
* Member type: float
* Get params: get_member(index, member);
* Set params: set_member(index, member, value);
*/
m_Knife_flBackStabMultiplier,
};

/**
Expand Down
11 changes: 9 additions & 2 deletions reapi/include/cssdk/dlls/API/CSPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class CCSPlayer: public CCSMonster
m_bCanShootOverride(false),
m_bGameForcingRespawn(false),
m_bAutoBunnyHopping(false),
m_bMegaBunnyJumping(false)
m_bMegaBunnyJumping(false),
m_bPlantC4Anywhere(false),
m_bSpawnProtectionEffects(false)
{
m_szModel[0] = '\0';
}
Expand Down Expand Up @@ -100,8 +102,11 @@ class CCSPlayer: public CCSMonster
virtual void SetSpawnProtection(float flProtectionTime) = 0;
virtual void RemoveSpawnProtection() = 0;
virtual bool HintMessageEx(const char *pMessage, float duration = 6.0f, bool bDisplayIfPlayerDead = false, bool bOverride = false) = 0;
virtual void Reset() = 0;
virtual void OnSpawnEquip(bool addDefault = true, bool equipGame = true) = 0;
virtual void SetScoreboardAttributes(CBasePlayer *destination = nullptr) = 0;

void Reset();
void ResetVars();

void OnSpawn();
void OnKilled();
Expand Down Expand Up @@ -131,6 +136,8 @@ class CCSPlayer: public CCSMonster
bool m_bGameForcingRespawn;
bool m_bAutoBunnyHopping;
bool m_bMegaBunnyJumping;
bool m_bPlantC4Anywhere;
bool m_bSpawnProtectionEffects;
};

// Inlines
Expand Down
1 change: 1 addition & 0 deletions reapi/include/cssdk/dlls/weapons.h
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ class CKnife: public CBasePlayerWeapon
float m_flSwingBaseDamage_Fast;
float m_flStabDistance;
float m_flSwingDistance;
float m_flBackStabMultiplier;
};

class CM249: public CBasePlayerWeapon
Expand Down
Loading
Loading