Skip to content

Commit 33ce426

Browse files
s1lentqyohimik
authored andcommitted
KillOfRarity: Add feature in-air kill
1 parent b8f19f2 commit 33ce426

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

regamedll/dlls/gamerules.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ enum KillRarity
252252
KILLRARITY_ASSISTEDFLASH = 0x020, // Assister helped with a flash
253253
KILLRARITY_DOMINATION_BEGAN = 0x040, // Killer player began dominating the victim (NOTE: this flag is set once)
254254
KILLRARITY_DOMINATION = 0x080, // Continues domination by the killer
255-
KILLRARITY_REVENGE = 0x100 // Revenge by the killer
255+
KILLRARITY_REVENGE = 0x100, // Revenge by the killer
256+
KILLRARITY_INAIR = 0x200 // Killer was in the air (skill to deal with high inaccuracy)
256257
};
257258

258259
enum

regamedll/dlls/multiplay_gamerules.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5314,6 +5314,10 @@ int CHalfLifeMultiplay::GetRarityOfKill(CBaseEntity *pKiller, CBasePlayer *pVict
53145314
const Vector inEyePos = pKillerPlayer->EyePosition();
53155315
if (TheCSBots()->IsLineBlockedBySmoke(&inEyePos, &pVictim->pev->origin))
53165316
iRarity |= KILLRARITY_THRUSMOKE;
5317+
5318+
// The killer player kills the victim while in air
5319+
if (!(pKillerPlayer->pev->flags & FL_ONGROUND))
5320+
iRarity |= KILLRARITY_INAIR;
53175321
}
53185322

53195323
// Calculate # of unanswered kills between killer & victim

0 commit comments

Comments
 (0)