Direct player attack lower by target's half height

To make sure it always hits the target.
This commit is contained in:
elsid 2025-03-03 00:18:39 +01:00
parent a6676fd6f3
commit 7670afcba1
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

@ -315,7 +315,8 @@ testing.registerLocalTest('playerWeaponAttack',
self.controls.run = true
self.controls.movement = 1
else
destination = targetActor.position
local halfExtents = types.Actor.getPathfindingAgentBounds(targetActor).halfExtents
destination = targetActor.position - util.vector3(0, 0, halfExtents.z)
if nextTime < time then
if use == 0 then