From ff5dfd6ed97b4dccdd0b586497955b1a3d62eadb Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 25 Jun 2023 01:28:11 +0300 Subject: [PATCH 20/20] AI: Use DAI_WANT_MILITARY_EMERGENCY in dai_choose_attacker_air() It was mistakenly using old magic value of 100. See osdn #48197 Signed-off-by: Marko Lindqvist --- ai/default/aiair.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ai/default/aiair.c b/ai/default/aiair.c index 193580ed0b..cf69b6087a 100644 --- a/ai/default/aiair.c +++ b/ai/default/aiair.c @@ -47,6 +47,7 @@ #include "ailog.h" #include "aitools.h" #include "aiunit.h" +#include "daimilitary.h" #include "aiair.h" @@ -578,7 +579,8 @@ bool dai_choose_attacker_air(struct ai_type *ait, struct player *pplayer, /* military_advisor_choose_build does something idiotic, * this function should not be called if there is danger... */ - if (choice->want >= 100 && choice->type != CT_ATTACKER) { + if (choice->want >= DAI_WANT_MILITARY_EMERGENCY + && choice->type != CT_ATTACKER) { return FALSE; } -- 2.40.1