]> git.localhorst.tv Git - blank.git/blobdiff - src/net/net.cpp
some experiements with state sync
[blank.git] / src / net / net.cpp
index 3f4bf7453eab78a0ac79b7f045026ec10114a8f0..98954bf0f168635ac5810b61b70889b2f6cb471e 100644 (file)
@@ -348,7 +348,10 @@ void ClientConnection::On(const Packet::PlayerUpdate &pack) {
        if (pack_diff > 0 || overdue) {
                player_update_pack = pack.Seq();
                // TODO: do client input validation here
-               pack.ReadPlayerState(Player().GetState());
+               EntityState new_state;
+               pack.ReadPlayerState(new_state);
+               Player().Velocity(new_state.velocity);
+               Player().Orientation(new_state.orient);
        }
 }