]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_user.c
Organize system and host globals into structs. Implement host state tracking
[xonotic/darkplaces.git] / sv_user.c
index 6c0468e5bcf204f62657ed48de96b17c40d0d544..08b4aa278f69c3201f148f6a6cd0b994942d5f8c 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -597,9 +597,9 @@ static void SV_ExecuteClientMoves(void)
 #endif
        // disable clientside movement prediction in some cases
        if (ceil(max(sv_readmoves[sv_numreadmoves-1].receivetime - sv_readmoves[sv_numreadmoves-1].time, 0) * 1000.0) < sv_clmovement_minping.integer)
-               host_client->clmovement_disabletimeout = realtime + sv_clmovement_minping_disabletime.value / 1000.0;
+               host_client->clmovement_disabletimeout = host.realtime + sv_clmovement_minping_disabletime.value / 1000.0;
        // several conditions govern whether clientside movement prediction is allowed
-       if (sv_readmoves[sv_numreadmoves-1].sequence && sv_clmovement_enable.integer && sv_clmovement_inputtimeout.value > 0 && host_client->clmovement_disabletimeout <= realtime && (PRVM_serveredictfloat(host_client->edict, disableclientprediction) == -1 || (PRVM_serveredictfloat(host_client->edict, movetype) == MOVETYPE_WALK && (!PRVM_serveredictfloat(host_client->edict, disableclientprediction)))))
+       if (sv_readmoves[sv_numreadmoves-1].sequence && sv_clmovement_enable.integer && sv_clmovement_inputtimeout.value > 0 && host_client->clmovement_disabletimeout <= host.realtime && (PRVM_serveredictfloat(host_client->edict, disableclientprediction) == -1 || (PRVM_serveredictfloat(host_client->edict, movetype) == MOVETYPE_WALK && (!PRVM_serveredictfloat(host_client->edict, disableclientprediction)))))
        {
                // process the moves in order and ignore old ones
                // but always trust the latest move