mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add player:set_eye_offset() by @MirceaKitsune and clean up
This commit is contained in:
parent
a1db9242ec
commit
c0ab09af74
16 changed files with 108 additions and 13 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue