From 869a6d7dbeb6dac89d73559f9c6086d567399d16 Mon Sep 17 00:00:00 2001 From: Allanis Date: Sat, 10 Aug 2013 12:58:59 +0100 Subject: [PATCH] [Change] Pilots now try to aim somewhat with missiles. --- scripts/ai/include/basic.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ai/include/basic.lua b/scripts/ai/include/basic.lua index a09704b..b448bf1 100644 --- a/scripts/ai/include/basic.lua +++ b/scripts/ai/include/basic.lua @@ -23,7 +23,8 @@ function attack() second = ai.secondary() -- Get best secondary weapon. -- Shoot missiles if in range. - if ai.secondary() == "Launcher" and dist < ai.getweaprange(1) then + if ai.secondary() == "Launcher" and + dist < ai.getweaprange(1) and dir < 30 then -- More lenient with aiming. ai.settarget(target) ai.shoot(2) end