mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 08:36:40 +00:00
Remember sneaking when game is saved and loaded(#7664)
This commit is contained in:
parent
8a8d77a444
commit
8d0d9a49c6
1 changed files with 11 additions and 0 deletions
|
@ -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…
Reference in a new issue