X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fserver%2Fnet.cpp;h=e210fef4ff1e7db6cf4a0a2e51f8b0a29f514bb6;hb=dcd54cacda98c2c0f7cf0c7a9131fb858d8ee10a;hp=e8325da1bd4ea1f0cfd08f0eda206d2e845e2f0e;hpb=efc3c1ba52cbe0fc9a4010c37c2d7c7020a0b481;p=blank.git diff --git a/src/server/net.cpp b/src/server/net.cpp index e8325da..e210fef 100644 --- a/src/server/net.cpp +++ b/src/server/net.cpp @@ -355,7 +355,7 @@ void ClientConnection::SendUpdates() { void ClientConnection::CheckPlayerFix() { // player_update_state's position holds the client's most recent prediction glm::vec3 diff = player_update_state.Diff(PlayerEntity().GetState()); - float dist_squared = dot(diff, diff); + float dist_squared = glm::length2(diff); // if client's prediction is off by more than 1cm, send // our (authoritative) state back so it can fix it