1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00

Start combat music for fleeing actors that haven't drawn a weapon

This commit is contained in:
Evil Eye 2024-09-16 16:38:26 +02:00
parent b32f68fcd2
commit 82cd151b4c

View File

@ -24,7 +24,7 @@ local function onUpdate()
-- Early-out for actors without targets and without combat state
-- TODO: use events or engine handlers to detect when targets change
local isStanceNothing = types.Actor.getStance(self) == types.Actor.STANCE.Nothing
if isStanceNothing and next(targets) == nil then
if isStanceNothing and next(targets) == nil and not AI.isFleeing() then
return
end