mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-12 16:34:52 +00:00
Direct player attack lower by target's half height
To make sure it always hits the target.
This commit is contained in:
parent
a6676fd6f3
commit
7670afcba1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user