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:
parent
8a8d77a444
commit
8d0d9a49c6
@ -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',
|
||||
---
|
||||
|
Loading…
x
Reference in New Issue
Block a user