1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00

Merge branch 'fix_lua_sneak' into 'master'

Remember sneaking when game is saved and loaded(#7664)

See merge request OpenMW/openmw!3546
This commit is contained in:
Alexei Kotov 2023-11-03 20:36:15 +00:00
commit d851eaa199

View File

@ -199,10 +199,21 @@ local function onInputAction(action)
end
end
local function onSave()
return {sneaking = self.controls.sneak}
end
local function onLoad(data)
if not data then return end
self.controls.sneak = data.sneaking or false
end
return {
engineHandlers = {
onFrame = onFrame,
onInputAction = onInputAction,
onSave = onSave,
onLoad = onLoad,
},
interfaceName = 'Controls',
---