File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -834,18 +834,19 @@ void GenericCAO::updateNodePos()
834
834
835
835
void GenericCAO::step (float dtime, ClientEnvironment *env)
836
836
{
837
- // Handel model of local player instantly to prevent lags
837
+ // Handle model animations and update positions instantly to prevent lags
838
838
if (m_is_local_player) {
839
839
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
+
840
845
if (m_is_visible) {
841
846
int old_anim = player->last_animation ;
842
847
float old_anim_speed = player->last_animation_speed ;
843
- m_position = player->getPosition ();
844
- m_rotation.Y = wrapDegrees_0_360 (player->getYaw ());
845
848
m_velocity = v3f (0 ,0 ,0 );
846
849
m_acceleration = v3f (0 ,0 ,0 );
847
- pos_translator.val_current = m_position;
848
- rot_translator.val_current = m_rotation;
849
850
const PlayerControl &controls = player->getPlayerControl ();
850
851
851
852
bool walking = false ;
You can’t perform that action at this time.
0 commit comments