From e7bcc892ab033c0f7de13397dd949ce9c7fec1ec Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 16 Jan 2012 21:33:04 +0100 Subject: [PATCH] rename cl_predictionerrorcompensation -> cl_movement_errorcompensation --- defaultXonotic.cfg | 2 +- qcsrc/client/Defs.qc | 4 +++- qcsrc/client/hud.qc | 1 + qcsrc/csqcmodellib/cl_player.qc | 6 +++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index b66424520..d003f80f3 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1776,7 +1776,7 @@ seta cl_forceplayercolors 0 "make everyone look like your own color (requires se seta cl_forcemyplayermodel "" "set to the model file name you want to show yourself as (requires server to have sv_use_csqc_players 1; does not affect how enemies look with cl_forceplayermodels)" seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (requires server to have sv_use_csqc_players 1; does not affect how enemies look with cl_forceplayermodels)" seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (requires server to have sv_use_csqc_players 1, and is ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)" -seta cl_predictionerrorcompensation 0 "try to compensate for prediction errors and reduce preceived lag (requires server to have sv_use_csqc_players 1)" +seta cl_movement_errorcompensation 0 "try to compensate for prediction errors and reduce preceived lag (requires server to have sv_use_csqc_players 1)" // debug cvars for keyhunt attaching set _angles "0 0 0" diff --git a/qcsrc/client/Defs.qc b/qcsrc/client/Defs.qc index e4519b2b3..2a1c9e67c 100644 --- a/qcsrc/client/Defs.qc +++ b/qcsrc/client/Defs.qc @@ -272,4 +272,6 @@ float serverflags; float uid2name_dialog; -.float csqcmodel_isdead; // used by shownames and miscfunctions (float getplayerisdead(float) {}) to know when a player is dead \ No newline at end of file +.float csqcmodel_isdead; // used by shownames and miscfunctions (float getplayerisdead(float) {}) to know when a player is dead + +#define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 1d0ad2200..02558c7ea 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2781,6 +2781,7 @@ void HUD_Score(void) string sign; vector distribution_color; entity tm, pl, me; + #ifdef COMPAT_XON050_ENGINE me = (spectatee_status > 0) ? playerslots[spectatee_status - 1] : playerslots[player_localentnum - 1]; #else diff --git a/qcsrc/csqcmodellib/cl_player.qc b/qcsrc/csqcmodellib/cl_player.qc index 40ba3f7a9..404a29a47 100644 --- a/qcsrc/csqcmodellib/cl_player.qc +++ b/qcsrc/csqcmodellib/cl_player.qc @@ -20,7 +20,7 @@ * IN THE SOFTWARE. */ -var float autocvar_cl_predictionerrorcompensation = 0; +var float autocvar_cl_movement_errorcompensation = 0; // engine stuff .float pmove_flags; @@ -56,7 +56,7 @@ vector CSQCPlayer_GetPredictionErrorV() void CSQCPlayer_SetPredictionError(vector o, vector v) { - if(!autocvar_cl_predictionerrorcompensation) + if(!autocvar_cl_movement_errorcompensation) { csqcplayer_predictionerrorfactor = 0; return; @@ -70,7 +70,7 @@ void CSQCPlayer_SetPredictionError(vector o, vector v) csqcplayer_predictionerroro = CSQCPlayer_GetPredictionErrorO() + o; csqcplayer_predictionerrorv = CSQCPlayer_GetPredictionErrorV() + v; - csqcplayer_predictionerrorfactor = autocvar_cl_predictionerrorcompensation / ticrate; + csqcplayer_predictionerrorfactor = autocvar_cl_movement_errorcompensation / ticrate; csqcplayer_predictionerrortime = time + 1.0 / csqcplayer_predictionerrorfactor; } -- 2.39.2