From 0c05dd7b83f98817b737a37d2de3ba9aa002f4b6 Mon Sep 17 00:00:00 2001 From: Oversword Date: Mon, 14 Feb 2022 21:47:08 +0000 Subject: [PATCH] make rotate on sneak a setting --- init.lua | 2 +- settingtypes.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 019c948..0806a1d 100644 --- a/init.lua +++ b/init.lua @@ -9,7 +9,7 @@ local ANIMATION_SPEED = tonumber(minetest.settings:get("playeranim.animation_spe local ANIMATION_SPEED_SNEAK = tonumber(minetest.settings:get("playeranim.animation_speed_sneak")) or 0.8 local BODY_ROTATION_DELAY = math.max(math.floor(tonumber(minetest.settings:get("playeranim.body_rotation_delay")) or 7), 1) local BODY_X_ROTATION_SNEAK = tonumber(minetest.settings:get("playeranim.body_x_rotation_sneak")) or 6.0 -local ROTATE_ON_SNEAK = true +local ROTATE_ON_SNEAK = minetest.settings:get_bool("playeranim.rotation_sneak", true) local BONE_POSITION, BONE_ROTATION = (function() local modname = minetest.get_current_modname() diff --git a/settingtypes.txt b/settingtypes.txt index cce3e89..f5b74c5 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -9,3 +9,6 @@ playeranim.animation_speed (The speed of an animation) float 2.4 # The number of stepping per seconds in sneaking. playeranim.animation_speed_sneak (The speed of an animation in sneaking) float 0.8 + +# Should the body be rotated on sneak +playeranim.rotation_sneak (Rotate the body on sneak) bool true