Skip to content

Commit

Permalink
WIPEOUT: fresh spawns aren't affected by enemy fire
Browse files Browse the repository at this point in the history
  • Loading branch information
dusty-qw committed Dec 7, 2023
1 parent 3d00eff commit 4f2335b
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/combat.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,23 @@ void T_Damage(gedict_t *targ, gedict_t *inflictor, gedict_t *attacker, float dam
}
}

// don't accept any damage in CA modes if no_pain is true (ie during respawn in wipeout)
// don't accept any damage in CA modes if no_pain is true
if (targ->no_pain)
{
tp4teamdmg = true; // don't take damage but still get stopped/bounced by weapon fire
{
if (attacker == targ)
{
tp4teamdmg = true; // don't take damage but still get stopped/bounced by weapon fire
}
else
{
if (targ->invincible_sound < g_globalvars.time)
{
sound(targ, CHAN_AUTO, "items/protect3.wav", 0.75, ATTN_NORM);
targ->invincible_sound = g_globalvars.time + 2;
}

return;
}
}
}

Expand Down

0 comments on commit 4f2335b

Please sign in to comment.