Skip to content

Commit b3f626c

Browse files
committed
nullcheck for actor having head in sharedbehaviours
1 parent c9859e9 commit b3f626c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Data/Base.rte/AI/SharedBehaviors.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ function SharedBehaviors.GoToWpt(AI, Owner, Abort)
848848
end
849849
else
850850
-- do we have a target we want to shoot at?
851-
if (AI.Target and AI.canHitTarget and AI.BehaviorName ~= "AttackTarget") then
851+
if Owner.Head and AI.Target and AI.canHitTarget and AI.BehaviorName ~= "AttackTarget" then
852852
-- are we also flying
853853
if AI.flying and Owner.Jetpack.JetpackType == AEJetpack.Standard then
854854
-- predict jetpack movement when jumping and there is a target (check one direction)

0 commit comments

Comments
 (0)