KillOfRarity: Add feature in-air kill

This commit is contained in:
s1lentq 2024-05-09 02:38:12 +07:00
parent 8706cc5a10
commit 9f66264562
2 changed files with 6 additions and 1 deletions

View File

@ -252,7 +252,8 @@ enum KillRarity
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_REVENGE = 0x100, // Revenge by the killer
KILLRARITY_INAIR = 0x200 // Killer was in the air (skill to deal with high inaccuracy)
};
enum

View File

@ -5314,6 +5314,10 @@ int CHalfLifeMultiplay::GetRarityOfKill(CBaseEntity *pKiller, CBasePlayer *pVict
const Vector inEyePos = pKillerPlayer->EyePosition();
if (TheCSBots()->IsLineBlockedBySmoke(&inEyePos, &pVictim->pev->origin))
iRarity |= KILLRARITY_THRUSMOKE;
// The killer player kills the victim while in air
if (!(pKillerPlayer->pev->flags & FL_ONGROUND))
iRarity |= KILLRARITY_INAIR;
}
// Calculate # of unanswered kills between killer & victim