Skip to content

Commit f6de86c

Browse files
committedDec 5, 2019
Fix LocalPlayer-bound sound playback broken by 81c2370
1 parent ef8bf3c commit f6de86c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

Diff for: ‎src/client/content_cao.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -834,18 +834,19 @@ void GenericCAO::updateNodePos()
834834

835835
void GenericCAO::step(float dtime, ClientEnvironment *env)
836836
{
837-
// Handel model of local player instantly to prevent lags
837+
// Handle model animations and update positions instantly to prevent lags
838838
if (m_is_local_player) {
839839
LocalPlayer *player = m_env->getLocalPlayer();
840+
m_position = player->getPosition();
841+
pos_translator.val_current = m_position;
842+
m_rotation.Y = wrapDegrees_0_360(player->getYaw());
843+
rot_translator.val_current = m_rotation;
844+
840845
if (m_is_visible) {
841846
int old_anim = player->last_animation;
842847
float old_anim_speed = player->last_animation_speed;
843-
m_position = player->getPosition();
844-
m_rotation.Y = wrapDegrees_0_360(player->getYaw());
845848
m_velocity = v3f(0,0,0);
846849
m_acceleration = v3f(0,0,0);
847-
pos_translator.val_current = m_position;
848-
rot_translator.val_current = m_rotation;
849850
const PlayerControl &controls = player->getPlayerControl();
850851

851852
bool walking = false;

0 commit comments

Comments
 (0)
Please sign in to comment.