diff --git a/src/g_ai.c b/src/g_ai.c index 054778a..00b7063 100644 --- a/src/g_ai.c +++ b/src/g_ai.c @@ -1172,7 +1172,7 @@ ai_checkattack(edict_t *self, float dist) return false; } - if (!visible(self, self->goalentity) && (self->monsterinfo.aiflags & AI_SOUND_TARGET)) + if ((self->monsterinfo.aiflags & AI_SOUND_TARGET) && !visible(self, self->goalentity)) { if ((level.time - self->enemy->last_sound_time) > 5.0) {