Fix for insane marines not firing deathtarget right away

This commit is contained in:
BjossiAlfreds 2020-01-02 11:24:53 +00:00
parent ccd16599ef
commit ff465863b9
2 changed files with 5 additions and 5 deletions

View file

@ -1223,10 +1223,10 @@ struct edict_s
void (*die)(edict_t *self, edict_t *inflictor, edict_t *attacker,
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 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;
int health;

View file

@ -55,7 +55,7 @@ insane_moan(edict_t *self)
}
/* suppress screaming so pain sounds can play */
if (self->delay > level.time)
if (self->fly_sound_debounce_time > level.time)
{
return;
}
@ -72,7 +72,7 @@ insane_scream(edict_t *self)
}
/* suppress screaming so pain sounds can play */
if (self->delay > level.time)
if (self->fly_sound_debounce_time > level.time)
{
return;
}
@ -658,7 +658,7 @@ insane_pain(edict_t *self, edict_t *other /* unused */, float kick, int damage)
gi.sound(self, CHAN_VOICE, 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 */
self->delay = level.time + 1;
self->fly_sound_debounce_time = level.time + 1;
if (skill->value == 3)
{