mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-25 21:41:57 +00:00
Client jump prediction fix;
CVAR_FIXME cleanup.
This commit is contained in:
parent
87f6b96eb6
commit
c6abe56fd1
1 changed files with 4 additions and 17 deletions
|
@ -27,7 +27,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
#include "cvar.h"
|
#include "cvar.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
@ -36,17 +36,13 @@
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#include "commdef.h"
|
#include "commdef.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
#include "winquake.h"
|
#include "winquake.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
/* cvar_t cl_nopred = {"cl_nopred","0"};
|
|
||||||
CVAR_FIXME */
|
|
||||||
cvar_t *cl_nopred;
|
cvar_t *cl_nopred;
|
||||||
/* cvar_t cl_pushlatency = {"pushlatency","-999"};
|
|
||||||
CVAR_FIXME */
|
|
||||||
cvar_t *cl_pushlatency;
|
cvar_t *cl_pushlatency;
|
||||||
|
|
||||||
extern frame_t *view_frame;
|
extern frame_t *view_frame;
|
||||||
|
@ -120,7 +116,8 @@ void CL_PredictUsercmd (player_state_t *from, player_state_t *to, usercmd_t *u,
|
||||||
//for (i=0 ; i<3 ; i++)
|
//for (i=0 ; i<3 ; i++)
|
||||||
//pmove.origin[i] = ((int)(pmove.origin[i]*8))*0.125;
|
//pmove.origin[i] = ((int)(pmove.origin[i]*8))*0.125;
|
||||||
to->waterjumptime = pmove.waterjumptime;
|
to->waterjumptime = pmove.waterjumptime;
|
||||||
to->oldbuttons = pmove.cmd.buttons;
|
to->oldbuttons = pmove.oldbuttons; // Tonik
|
||||||
|
// to->oldbuttons = pmove.cmd.buttons;
|
||||||
VectorCopy (pmove.origin, to->origin);
|
VectorCopy (pmove.origin, to->origin);
|
||||||
VectorCopy (pmove.angles, to->viewangles);
|
VectorCopy (pmove.angles, to->viewangles);
|
||||||
VectorCopy (pmove.velocity, to->velocity);
|
VectorCopy (pmove.velocity, to->velocity);
|
||||||
|
@ -143,16 +140,12 @@ void CL_PredictMove (void)
|
||||||
frame_t *from, *to = NULL;
|
frame_t *from, *to = NULL;
|
||||||
int oldphysent;
|
int oldphysent;
|
||||||
|
|
||||||
/* if (cl_pushlatency.value > 0)
|
|
||||||
CVAR_FIXME */
|
|
||||||
if (cl_pushlatency->value > 0)
|
if (cl_pushlatency->value > 0)
|
||||||
Cvar_Set (cl_pushlatency, "0");
|
Cvar_Set (cl_pushlatency, "0");
|
||||||
|
|
||||||
if (cl.paused)
|
if (cl.paused)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* cl.time = realtime - cls.latency - cl_pushlatency.value*0.001;
|
|
||||||
CVAR_FIXME */
|
|
||||||
cl.time = realtime - cls.latency - cl_pushlatency->value*0.001;
|
cl.time = realtime - cls.latency - cl_pushlatency->value*0.001;
|
||||||
if (cl.time > realtime)
|
if (cl.time > realtime)
|
||||||
cl.time = realtime;
|
cl.time = realtime;
|
||||||
|
@ -183,8 +176,6 @@ void CL_PredictMove (void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if (cl_nopred.value)
|
|
||||||
CVAR_FIXME */
|
|
||||||
if (cl_nopred->value)
|
if (cl_nopred->value)
|
||||||
{
|
{
|
||||||
VectorCopy (from->playerstate[cl.playernum].velocity, cl.simvel);
|
VectorCopy (from->playerstate[cl.playernum].velocity, cl.simvel);
|
||||||
|
@ -252,11 +243,7 @@ CL_InitPrediction
|
||||||
*/
|
*/
|
||||||
void CL_InitPrediction (void)
|
void CL_InitPrediction (void)
|
||||||
{
|
{
|
||||||
/* Cvar_RegisterVariable (&cl_pushlatency);
|
|
||||||
CVAR_FIXME */
|
|
||||||
cl_pushlatency = Cvar_Get("pushlatency", "-999", CVAR_NONE, "None");
|
cl_pushlatency = Cvar_Get("pushlatency", "-999", CVAR_NONE, "None");
|
||||||
/* Cvar_RegisterVariable (&cl_nopred);
|
|
||||||
CVAR_FIXME */
|
|
||||||
cl_nopred = Cvar_Get("cl_nopred", "0", CVAR_NONE, "None");
|
cl_nopred = Cvar_Get("cl_nopred", "0", CVAR_NONE, "None");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue