From df29a29633a0adc4500594c57f19729a57b87cf6 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Tue, 20 Dec 2016 15:22:57 +0100 Subject: [PATCH] Reorder conditionals to please unoptimizing compilers This was requested by Maraakate. This is likely a noop, since even early compilers from th 1970th supported simple optimiziations like this. --- src/g_ai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_ai.c b/src/g_ai.c index a6019ac..f3cf829 100644 --- a/src/g_ai.c +++ b/src/g_ai.c @@ -882,7 +882,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) {