Jump to content

[re-report] Houndius Shootius stops attacking (with patch)


chaosmonkey
  • Pending

Houndius Shootius frequently gives up attacking hounds if the hounds switch targets to the shootius and can't reach it. The hounds don't give up; they continue trying to attack the shootius, but the shootius just sits idle. This same phenomenon happens with frogs and all other creatures given the described behavior.

The fix to the issue is straightforward; the retarget function should target guys trying to attack players or shootius.

I've tested with the following patch, and it resolved the issue.

diff --git a/scripts/prefabs/eyeturret.lua b/scripts/prefabs/eyeturret.lua
index 7381673..1ce89ae 100644
--- a/scripts/prefabs/eyeturret.lua
+++ b/scripts/prefabs/eyeturret.lua
@@ -75,7 +75,7 @@ local function retargetfn(inst)

     return FindEntity(inst, TUNING.EYETURRET_RANGE + 3,
         function(guy)
-            return (playertargets[guy] or (guy.components.combat.target ~= nil and guy.components.combat.target:HasTag("player")))
+            return (playertargets[guy] or (guy.components.combat.target ~= nil and (guy.components.combat.target:HasTag("player") or guy.components.combat.target:HasTag("eyeturret"))))
                                        and inst.components.combat:CanTarget(guy)
         end,
         RETARGET_MUST_TAGS, --see entityreplica.lua

The houndius shootius feels *so much better* with this simple patch which simply allows them to defend themselves when an enemy is trying to attack them.


Steps to Reproduce

Reproducing with hounds:

spawn an eyeturret

put statues around it

spawn some hounds, agro them, and wait for them to switch to eyeturret and for eyeturret to give up

 

 

Reproducing with frogs:

spawn an eyeturret

put walls around it

spawn frogs, agro them, and let them switch to eyeturret. wait for eyeturret to give up.




User Feedback


I believe current houndius targeting is intended, not a bug, the feature you want is a QOL change, not a bug fix.
All allies mob will target mobs that target player, or player target, that the specific code of ally mob.
Mobs only target another mob if they successfully got hit, not when the other mob try to target.

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...