diff options
author | SmallJoker <mk939@ymail.com> | 2019-12-05 20:35:31 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-12-31 21:31:53 +0000 |
commit | 0d8f598df214f9464baa939f2a7ce1d1750101a9 (patch) | |
tree | a3a4905f2e9a2bbbcdc8f8b1f566aa44301c3f2e /src | |
parent | 2ef04cc3089a960df641aada03a09bb5cef4da46 (diff) | |
download | minetest-0d8f598df214f9464baa939f2a7ce1d1750101a9.tar.gz minetest-0d8f598df214f9464baa939f2a7ce1d1750101a9.tar.bz2 minetest-0d8f598df214f9464baa939f2a7ce1d1750101a9.zip |
Fix LocalPlayer-bound sound playback broken by 81c2370
Diffstat (limited to 'src')
-rw-r--r-- | src/client/content_cao.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp index a15c1cc0b..5521a6cf1 100644 --- a/src/client/content_cao.cpp +++ b/src/client/content_cao.cpp @@ -834,18 +834,19 @@ void GenericCAO::updateNodePos() void GenericCAO::step(float dtime, ClientEnvironment *env) { - // Handel model of local player instantly to prevent lags + // Handle model animations and update positions instantly to prevent lags if (m_is_local_player) { LocalPlayer *player = m_env->getLocalPlayer(); + m_position = player->getPosition(); + pos_translator.val_current = m_position; + m_rotation.Y = wrapDegrees_0_360(player->getYaw()); + rot_translator.val_current = m_rotation; + if (m_is_visible) { int old_anim = player->last_animation; float old_anim_speed = player->last_animation_speed; - m_position = player->getPosition(); - m_rotation.Y = wrapDegrees_0_360(player->getYaw()); m_velocity = v3f(0,0,0); m_acceleration = v3f(0,0,0); - pos_translator.val_current = m_position; - rot_translator.val_current = m_rotation; const PlayerControl &controls = player->getPlayerControl(); bool walking = false; |