mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +03:00
Bugfix: trigger_hurt should not inflict more damage than established.
This commit is contained in:
parent
cf95faadaf
commit
0006bac1a0
@ -832,7 +832,11 @@ void CBaseTrigger::HurtTouch(CBaseEntity *pOther)
|
|||||||
{
|
{
|
||||||
if (pev->dmgtime > gpGlobals->time)
|
if (pev->dmgtime > gpGlobals->time)
|
||||||
{
|
{
|
||||||
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
if (gpGlobals->time >= pev->pain_finished)
|
||||||
|
#else
|
||||||
if (gpGlobals->time != pev->pain_finished)
|
if (gpGlobals->time != pev->pain_finished)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// too early to hurt again, and not same frame with a different entity
|
// too early to hurt again, and not same frame with a different entity
|
||||||
if (!pOther->IsPlayer())
|
if (!pOther->IsPlayer())
|
||||||
@ -868,7 +872,11 @@ void CBaseTrigger::HurtTouch(CBaseEntity *pOther)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Original code -- single player
|
// 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)
|
if (pev->dmgtime > gpGlobals->time && gpGlobals->time != pev->pain_finished)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
// too early to hurt again, and not same frame with a different entity
|
// too early to hurt again, and not same frame with a different entity
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user