Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions reapi/include/cssdk/dlls/gamerules.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,50 @@ enum
GR_NEUTRAL,
};


// The number of times you must kill a given player to be dominating them
// Should always be more than 1
const int CS_KILLS_FOR_DOMINATION = 4;

// Flags for specifying extra info about player death
enum DeathMessageFlags
{
// float[3]
// Position where the victim was killed by the enemy
PLAYERDEATH_POSITION = 0x001,

// byte
// Index of the assistant who helped the attacker kill the victim
PLAYERDEATH_ASSISTANT = 0x002,

// short
// Bitsum classification for the rarity of the kill
// See enum KillRarity for details
PLAYERDEATH_KILLRARITY = 0x004
};

// Classifying various player kill methods in the game
enum KillRarity
{
KILLRARITY_HEADSHOT = 0x001, // Headshot
KILLRARITY_KILLER_BLIND = 0x002, // Killer was blind
KILLRARITY_NOSCOPE = 0x004, // No-scope sniper rifle kill
KILLRARITY_PENETRATED = 0x008, // Penetrated kill (through walls)
KILLRARITY_THRUSMOKE = 0x010, // Smoke grenade penetration kill (bullets went through smoke)
KILLRARITY_ASSISTEDFLASH = 0x020, // Assister helped with a flash
KILLRARITY_DOMINATION_BEGAN = 0x040, // Killer player began dominating the victim (NOTE: this flag is set once)
KILLRARITY_DOMINATION = 0x080, // Continues domination by the killer
KILLRARITY_REVENGE = 0x100, // Revenge by the killer
KILLRARITY_INAIR = 0x200 // Killer was in the air (skill to deal with high inaccuracy)
};

enum
{
DEFUSERALLOCATION_NONE = 0,
DEFUSERALLOCATION_RANDOM = 1,
DEFUSERALLOCATION_ALL = 2,
};

class CItem;

class CGameRules
Expand Down
1 change: 1 addition & 0 deletions reapi/include/cssdk/dlls/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ class CBasePlayer: public CBaseMonster
bool IsProtectedByShield() { return m_bOwnsShield && m_bShieldDrawn; }
bool IsReloading() const;
bool IsBlind() const { return (m_blindUntilTime > gpGlobals->time); }
bool IsFullyBlind(const float flPeekTime = 0.6f) const { return m_blindAlpha >= 255 && m_blindFadeTime > (flPeekTime * 2.0f) && (m_blindStartTime + m_blindHoldTime + flPeekTime) > gpGlobals->time; }
bool IsAutoFollowAllowed() const { return (gpGlobals->time > m_allowAutoFollowTime); }
void InhibitAutoFollow(float duration) { m_allowAutoFollowTime = gpGlobals->time + duration; }
void AllowAutoFollow() { m_allowAutoFollowTime = 0; }
Expand Down