Fix for insane marines not firing deathtarget right away

This commit is contained in:
BjossiAlfreds 2020-01-02 11:12:50 +00:00
parent f4a27d5eab
commit 0ebc6eca38
2 changed files with 5 additions and 5 deletions

View file

@ -1031,10 +1031,10 @@ struct edict_s
void (*die)(edict_t *self, edict_t *inflictor, edict_t *attacker, void (*die)(edict_t *self, edict_t *inflictor, edict_t *attacker,
int damage, vec3_t point); int damage, vec3_t point);
float touch_debounce_time; /* are all these legit? do we need more/less of them? */ float touch_debounce_time;
float pain_debounce_time; float pain_debounce_time;
float damage_debounce_time; float damage_debounce_time;
float fly_sound_debounce_time; /* move to clientinfo */ float fly_sound_debounce_time; /* now also used by insane marines to store pain sound timeout */
float last_move_time; float last_move_time;
int health; int health;

View file

@ -55,7 +55,7 @@ insane_moan(edict_t *self)
} }
/* suppress screaming so pain sound can play */ /* suppress screaming so pain sound can play */
if (self->delay > level.time) if (self->fly_sound_debounce_time > level.time)
{ {
return; return;
} }
@ -72,7 +72,7 @@ insane_scream(edict_t *self)
} }
/* suppress screaming so pain sound can play */ /* suppress screaming so pain sound can play */
if (self->delay > level.time) if (self->fly_sound_debounce_time > level.time)
{ {
return; return;
} }
@ -660,7 +660,7 @@ insane_pain(edict_t *self, edict_t *other /* unused */,
gi.soundindex(va("player/male/pain%i_%i.wav", l, r)), 1, ATTN_IDLE, 0); gi.soundindex(va("player/male/pain%i_%i.wav", l, r)), 1, ATTN_IDLE, 0);
/* suppress screaming and moaning for 1 second so pain sound plays */ /* suppress screaming and moaning for 1 second so pain sound plays */
self->delay = level.time + 1; self->fly_sound_debounce_time = level.time + 1;
if (skill->value == 3) if (skill->value == 3)
{ {