1
0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-16 05:51:29 +00:00

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

@ -315,7 +315,8 @@ testing.registerLocalTest('playerWeaponAttack',
self.controls.run = true self.controls.run = true
self.controls.movement = 1 self.controls.movement = 1
else 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 nextTime < time then
if use == 0 then if use == 0 then