1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-30 16:20:21 +00:00

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

This commit is contained in:
Zackhasacat 2023-11-03 20:36:14 +00:00 committed by Alexei Kotov
parent 8a8d77a444
commit 8d0d9a49c6

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',
---