Jump to content

Missing Check For whether or not a mob is dead.

  • Fixed

Related to this issue:

I looked into the issue a bit more, since this isn't actually exactly exclusive to the slingshot. For the longest time there was always this small pause between killing mobs.

Notice how my character here pauses every time the target it's killed has died. Generally you can cancel this "pause" by moving your character or using the mouse, but it'd be a big QoL improvement to be able to simply hold F and not have your character do this strange pause.

After looking into it, I stumbled upon line 2315 in components/playercontroller.lua

if retarget ~= nil and CanEntitySeeTarget(self.inst, retarget) then

After putting some thought into it, I realised the player wasn't actually checking whether or not retarget was dead, so I applied another check.

if (retarget ~= nil and not retarget.replica.health:IsDead()) and CanEntitySeeTarget(self.inst, retarget) then

And after testing in-game, I get much smoother combat!

That little pause between killing mobs is gone, and this improves the QoL of combat so much! This also fixes the issue with slingshot speed resetting when holding F on a horde of mobs.

Hope this may get fixed :D

Steps to Reproduce

1. Spawn a horde of mobs
2. Hold the attack button
3. Notice how there is a little pause between each mob you kill

  • Like 22
  • Thanks 3
  • Sad 1
  • Wavey 1

User Feedback

A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.
1 minute ago, lakhnish said:

@Hornete While holding F, does it switch targets at all or does it keep smacking the same target until it's dead?

While holding F, the player will only switch targets if it's target dies. 

If you get interrupted(hit by an enemy, etc) then you might switch targets when you resume attacking.

  • Like 3

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...