[Change] AI aims earliar, much more accurate now.
This commit is contained in:
parent
1e07c0e973
commit
e40a9ecbf7
@ -15,7 +15,7 @@ function atk_g_think()
|
||||
range = ai.getweaprange()
|
||||
|
||||
-- Shouldn't switch targets if close.
|
||||
if dist > range * 1.3 then
|
||||
if dist > range * 1.6 then
|
||||
ai.poptask()
|
||||
ai.pushtask(0, "attack", enemy)
|
||||
end
|
||||
@ -41,7 +41,7 @@ function atk_g()
|
||||
range = ai.getweaprange()
|
||||
|
||||
-- We first bias towards range.
|
||||
if dist > range then
|
||||
if dist > range*1.3 then
|
||||
dir = ai.face(target) -- Normal face the target.
|
||||
|
||||
secondary, special, ammo = ai.secondary("Launcher")
|
||||
@ -75,7 +75,7 @@ function atk_g()
|
||||
end
|
||||
end
|
||||
|
||||
if dir < 10 or ai.hasturrets() then
|
||||
if(dir < 10 and dist < range) or ai.hasturrets() then
|
||||
ai.shoot()
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user