X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fclient%2Fnet.cpp;h=b1076ba56c41a98d97cb882168dcecff5118aab3;hb=7f15e27277382f0176a23dd21702f9d113581763;hp=f0a9eee6af31c04608670c8cfae0d3ef960e3800;hpb=8de9eb53c9ae92c6bfa8f01cf6659b683fe2155d;p=blank.git diff --git a/src/client/net.cpp b/src/client/net.cpp index f0a9eee..b1076ba 100644 --- a/src/client/net.cpp +++ b/src/client/net.cpp @@ -376,7 +376,7 @@ void NetworkedInput::MergePlayerCorrection(uint16_t seq, const EntityState &corr } } - EntityState &player_state = GetPlayer().GetEntity().GetState(); + EntityState player_state = GetPlayer().GetEntity().GetState(); Entity replay(GetPlayer().GetEntity()); replay.SetState(corrected_state); @@ -418,6 +418,7 @@ void NetworkedInput::MergePlayerCorrection(uint16_t seq, const EntityState &corr displacement *= 0.01f / sqrt(disp_squared); player_state.block_pos += displacement; } + GetPlayer().GetEntity().SetState(player_state); } void NetworkedInput::StartPrimaryAction() {