Skip to content

Commit

Permalink
Set KILLRARITY_KILLER_BLIND flag only when fully blind
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Dec 22, 2023
1 parent 0e68bed commit 6c9019b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion regamedll/dlls/multiplay_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5264,7 +5264,7 @@ int CHalfLifeMultiplay::GetRarityOfKill(CBaseEntity *pKiller, CBasePlayer *pVict
if (pVictim->GetDmgPenetrationLevel() > 0)
iRarity |= KILLRARITY_PENETRATED;

if (pKillerPlayer->IsBlind())
if (pKillerPlayer->IsFullyBlind())
iRarity |= KILLRARITY_KILLER_BLIND;

// The killer player kills the victim with a sniper rifle with no scope
Expand Down
1 change: 1 addition & 0 deletions regamedll/dlls/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ class CBasePlayer: public CBaseMonster {
bool IsReloading() const;
bool HasTimePassedSinceDeath(float duration) 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

1 comment on commit 6c9019b

@StevenKal
Copy link
Contributor

@StevenKal StevenKal commented on 6c9019b Dec 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@s1lentq & @wopox1337 : Many changes happenned from the last public release, might be time to prepare a new one soon (at least once the commits are gonna be stabilized, because many new ones recently)! Same thing for the 2 others projects!
Besides, current commits amount is "666"! Evil XMAS release!

Please sign in to comment.