diff options
author | BlockMen <nmuelll@web.de> | 2014-04-11 15:32:46 +0200 |
---|---|---|
committer | BlockMen <nmuelll@web.de> | 2014-04-12 17:44:20 +0200 |
commit | c0ab09af747fc431dfb459ede30788cb9cd1c56b (patch) | |
tree | 7355b0b349a6d188e6066c00c3b3ef9b0a76f33e /src/content_cao.cpp | |
parent | a1db9242ec491efdee70a7184aa61e861b17595a (diff) | |
download | minetest-c0ab09af747fc431dfb459ede30788cb9cd1c56b.tar.gz minetest-c0ab09af747fc431dfb459ede30788cb9cd1c56b.tar.bz2 minetest-c0ab09af747fc431dfb459ede30788cb9cd1c56b.zip |
Add player:set_eye_offset() by @MirceaKitsune and clean up
Diffstat (limited to 'src/content_cao.cpp')
-rw-r--r-- | src/content_cao.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp index dc3bae00d..dbaf13cc8 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -41,7 +41,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "util/mathconstants.h" #include "map.h" #include "main.h" // g_settings -#include "game.h" // CameraModes +#include "camera.h" // CameraModes #include <IMeshManipulator.h> #include <IAnimatedMeshSceneNode.h> #include <IBoneSceneNode.h> @@ -1099,8 +1099,14 @@ public: walking = true; m_animation_speed = player->local_animation_speed; + if(!player->touching_ground && + g_settings->getBool("free_move") && + m_gamedef->checkLocalPrivilege("fly") && + g_settings->getBool("fast_move") && + m_gamedef->checkLocalPrivilege("fast")) + m_animation_speed *= 1.5; if(controls.sneak && walking) - m_animation_speed = player->local_animation_speed/2; + m_animation_speed /= 2; player->last_animation_speed = m_animation_speed; |