1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 21:35:24 +00:00

Make paralysis cancel camera mode changes (#7997)

This commit is contained in:
Alexei Kotov 2024-05-23 12:21:29 +03:00
parent ae7861abe4
commit 462818c304
2 changed files with 5 additions and 1 deletions

View File

@ -176,6 +176,7 @@
Bug #7943: Using "addSoulGem" and "dropSoulGem" commands to creatures works only with "Weapon & Shield" flagged ones
Bug #7970: Difference of GetPCSleep (?) behavior between vanilla and OpenMW
Bug #7980: Paralyzed NPCs' lips move
Bug #7997: Can toggle perspective when paralyzed
Feature #1415: Infinite fall failsafe
Feature #2566: Handle NAM9 records for manual cell references
Feature #3537: Shader-based water ripples

View File

@ -1,5 +1,6 @@
local camera = require('openmw.camera')
local core = require('openmw.core')
local debug = require('openmw.debug')
local input = require('openmw.input')
local util = require('openmw.util')
local self = require('openmw.self')
@ -207,7 +208,9 @@ local function onFrame(dt)
primaryMode = mode
end
if mode ~= MODE.Static then
if not next(noModeControl) then
local paralysis = Actor.activeEffects(self):getEffect(core.magic.EFFECT_TYPE.Paralyze)
local paralyzed = not debug.isGodMode() and paralysis.magnitude > 0
if not next(noModeControl) and not paralyzed then
updatePOV(dt)
updateVanity(dt)
end