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:
commit
d851eaa199
@ -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 New Issue
Block a user