Skip to content

Commit 82307d4

Browse files
committed
Merge branch 'lua_player_attack_test' into 'master'
Direct player attack lower by target's half height See merge request OpenMW/openmw!4562
2 parents 6e9d15f + 7670afc commit 82307d4

File tree

1 file changed

+2
-1
lines changed
  • scripts/data/integration_tests/test_lua_api

1 file changed

+2
-1
lines changed

scripts/data/integration_tests/test_lua_api/player.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ testing.registerLocalTest('playerWeaponAttack',
315315
self.controls.run = true
316316
self.controls.movement = 1
317317
else
318-
destination = targetActor.position
318+
local halfExtents = types.Actor.getPathfindingAgentBounds(targetActor).halfExtents
319+
destination = targetActor.position - util.vector3(0, 0, halfExtents.z)
319320

320321
if nextTime < time then
321322
if use == 0 then

0 commit comments

Comments
 (0)