Skip to content

Commit

Permalink
Bugfix: trigger_hurt should not inflict more damage than established.
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Oct 11, 2016
1 parent cf95faa commit 0006bac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions regamedll/dlls/triggers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,11 @@ void CBaseTrigger::HurtTouch(CBaseEntity *pOther)
{
if (pev->dmgtime > gpGlobals->time)
{
#ifdef REGAMEDLL_FIXES
if (gpGlobals->time >= pev->pain_finished)
#else
if (gpGlobals->time != pev->pain_finished)
#endif
{
// too early to hurt again, and not same frame with a different entity
if (!pOther->IsPlayer())
Expand Down Expand Up @@ -868,7 +872,11 @@ void CBaseTrigger::HurtTouch(CBaseEntity *pOther)
else
{
// Original code -- single player
#ifdef REGAMEDLL_FIXES
if (pev->dmgtime > gpGlobals->time && gpGlobals->time >= pev->pain_finished)
#else
if (pev->dmgtime > gpGlobals->time && gpGlobals->time != pev->pain_finished)
#endif
{
// too early to hurt again, and not same frame with a different entity
return;
Expand Down

0 comments on commit 0006bac

Please sign in to comment.