mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-14 23:58:06 +03:00
Fixed rarity of kills suicide, thrusmoke and for some weapons
This commit is contained in:
parent
28e2bc45f6
commit
0e68bedf24
@ -5250,26 +5250,32 @@ int CHalfLifeMultiplay::GetRarityOfKill(CBaseEntity *pKiller, CBasePlayer *pVict
|
|||||||
if (pVictim->m_bHeadshotKilled)
|
if (pVictim->m_bHeadshotKilled)
|
||||||
iRarity |= KILLRARITY_HEADSHOT;
|
iRarity |= KILLRARITY_HEADSHOT;
|
||||||
|
|
||||||
// The killer player kills the victim through the walls
|
|
||||||
if (pVictim->GetDmgPenetrationLevel() > 0)
|
|
||||||
iRarity |= KILLRARITY_PENETRATED;
|
|
||||||
|
|
||||||
// The killer player was blind
|
// The killer player was blind
|
||||||
if (pKiller && pKiller->IsPlayer())
|
CBasePlayer *pKillerPlayer = static_cast<CBasePlayer *>(pKiller);
|
||||||
|
if (pKillerPlayer && pKillerPlayer->IsPlayer())
|
||||||
{
|
{
|
||||||
CBasePlayer *pKillerPlayer = static_cast<CBasePlayer *>(pKiller);
|
|
||||||
if (pKillerPlayer->IsBlind())
|
|
||||||
iRarity |= KILLRARITY_KILLER_BLIND;
|
|
||||||
|
|
||||||
// The killer player kills the victim with a sniper rifle with no scope
|
|
||||||
WeaponClassType weaponClass = AliasToWeaponClass(killerWeaponName);
|
WeaponClassType weaponClass = AliasToWeaponClass(killerWeaponName);
|
||||||
if (weaponClass == WEAPONCLASS_SNIPERRIFLE && pKillerPlayer->m_iClientFOV == DEFAULT_FOV)
|
if (pKillerPlayer != pVictim
|
||||||
iRarity |= KILLRARITY_NOSCOPE;
|
&& weaponClass != WEAPONCLASS_NONE
|
||||||
|
&& weaponClass != WEAPONCLASS_KNIFE
|
||||||
|
&& weaponClass != WEAPONCLASS_GRENADE)
|
||||||
|
{
|
||||||
|
// The killer player kills the victim through the walls
|
||||||
|
if (pVictim->GetDmgPenetrationLevel() > 0)
|
||||||
|
iRarity |= KILLRARITY_PENETRATED;
|
||||||
|
|
||||||
// The killer player kills the victim through smoke
|
if (pKillerPlayer->IsBlind())
|
||||||
const Vector inEyePos = pKillerPlayer->EyePosition();
|
iRarity |= KILLRARITY_KILLER_BLIND;
|
||||||
if (TheCSBots()->IsLineBlockedBySmoke(&inEyePos, &pVictim->pev->origin))
|
|
||||||
iRarity |= KILLRARITY_THRUSMOKE;
|
// The killer player kills the victim with a sniper rifle with no scope
|
||||||
|
if (weaponClass == WEAPONCLASS_SNIPERRIFLE && pKillerPlayer->m_iClientFOV == DEFAULT_FOV)
|
||||||
|
iRarity |= KILLRARITY_NOSCOPE;
|
||||||
|
|
||||||
|
// The killer player kills the victim through smoke
|
||||||
|
const Vector inEyePos = pKillerPlayer->EyePosition();
|
||||||
|
if (TheCSBots()->IsLineBlockedBySmoke(&inEyePos, &pVictim->pev->origin))
|
||||||
|
iRarity |= KILLRARITY_THRUSMOKE;
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate # of unanswered kills between killer & victim
|
// Calculate # of unanswered kills between killer & victim
|
||||||
// This is plus 1 as this function gets called before the stat is updated
|
// This is plus 1 as this function gets called before the stat is updated
|
||||||
|
Loading…
x
Reference in New Issue
Block a user