Merge pull request #59 from BjossiAlfreds/timeout-fix

Fix for insane marines not firing deathtarget right away
This commit is contained in:
Yamagi 2020-01-05 10:09:39 +01:00 committed by GitHub
commit f7b99b07c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -1222,10 +1222,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)
{