From d5a905fad6db2c334e7c16d6edea49ebc3303717 Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 28 Dec 2015 21:20:56 +0000 Subject: [PATCH] Document DP_SV_DISABLECLIENTPREDICTION. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12239 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=5368a5ab9c2f16dd8d8bda9c6bac39ff6e242516 --- dpdefs/dpextensions.qc | 38 +++++++++++++++++++++++++++++++------- svvm_cmds.c | 1 + 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/dpdefs/dpextensions.qc b/dpdefs/dpextensions.qc index c085bf51..2499673c 100644 --- a/dpdefs/dpextensions.qc +++ b/dpdefs/dpextensions.qc @@ -1,13 +1,6 @@ //DarkPlaces supported extension list, draft version 1.04 -//things that don't have extensions yet: -.float disableclientprediction; -// 0 allows prediction only for MOVETYPE_WALK -// 1 disables prediction completely -// -1 allows prediction for all movetypes -// Requires CSQC to perform player prediction, and requires explicit CSQC networking of movetype (or equivalent) from server to client. - //definitions that id Software left out: //these are passed as the 'nomonsters' parameter to traceline/tracebox (yes really this was supported in all quake engines, nomonsters is misnamed) float MOVE_NORMAL = 0; // same as FALSE @@ -1488,6 +1481,37 @@ float(entity clent) clienttype = #455; // returns one of the CLIENTTYPE_* consta //implementation notes: //entity customization is done before per-client culling (visibility for instance) because the entity may be doing setorigin to display itself in different locations on different clients, may be altering its .modelindex, .effects and other fields important to culling, so customized entities increase cpu usage (non-customized entities can use all the early culling they want however, as they are not changing on a per client basis). +//DP_SV_DISABLECLIENTPREDICTION +//idea: LordHavoc, Mario +//darkplaces implementation: LordHavoc, Mario +//field definitions: +.float disableclientprediction; +//description: +//By default, player entities are enabled for prediction by the engine if the +//engine assumes the client can sensibly predict them. As the NQ and DarkPlaces +//protocol does not network movetype, this in particular allows for client +//prediction only if movetype == MOVETYPE_WALK. +//Setting this field to 1 disables prediction in any case - this is useful when +//the client cannot sensibly predict the server's idea of how the player moves +//(common in case of pure serverside grappling hook or jetpack +//implementations). +//Setting this field to -1 forces prediction even if the server assumes the +//client cannot predict the current movetype of a player entity (obviously, +//this then requires matching client-side prediction code in CSQC, as the +//engine's own client prediction will sure not handle these cases right due to +//not knowing the serverside value of movetype). This is allowed in combination +//with the following movetypes: +// MOVETYPE_NONE (useful to have full QC control over movement) +// MOVETYPE_WALK (redundant but harmless) +// MOVETYPE_STEP +// MOVETYPE_FLY (useful for spectators) +// MOVETYPE_TOSS +// MOVETYPE_NOCLIP (useful for spectators) +// MOVETYPE_FLYMISSILE +// MOVETYPE_BOUNCE +// MOVETYPE_BOUNCEMISSILE +// MOVETYPE_FLY_WORLDONLY (useful for spectators) + //DP_SV_DISCARDABLEDEMO //idea: parasti //darkplaces implementation: parasti diff --git a/svvm_cmds.c b/svvm_cmds.c index ff55c4fd..1c74acd0 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -168,6 +168,7 @@ const char *vm_sv_extensions = "DP_SV_CLIENTNAME " "DP_SV_CMD " "DP_SV_CUSTOMIZEENTITYFORCLIENT " +"DP_SV_DISABLECLIENTPREDICTION " "DP_SV_DISCARDABLEDEMO " "DP_SV_DRAWONLYTOCLIENT " "DP_SV_DROPCLIENT " -- 2.39.2