]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
got rid of sv_predict because it caused too many problems with mods trying to have...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 3 Jul 2003 00:45:48 +0000 (00:45 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 3 Jul 2003 00:45:48 +0000 (00:45 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3147 d7cf8633-e32d-0410-b094-e92efae38249

server.h
sv_main.c
sv_user.c

index 8eb1153d3ffea391210abe30b3fa0e87656c1203..aa2493fa2153bd663ce0894c3ddd80e4cbecec08 100644 (file)
--- a/server.h
+++ b/server.h
@@ -133,8 +133,6 @@ typedef struct client_s
        int num_pings;
        // LordHavoc: can be used for prediction or whatever...
        float ping;
-       // LordHavoc: specifically used for prediction, accounts for sys_ticrate too
-       float latency;
 
 // spawn parms are carried from level to level
        float spawn_parms[NUM_SPAWN_PARMS];
@@ -245,7 +243,6 @@ extern cvar_t sv_maxspeed;
 extern cvar_t sv_accelerate;
 extern cvar_t sv_idealpitchscale;
 extern cvar_t sv_aim;
-extern cvar_t sv_predict;
 extern cvar_t sv_stepheight;
 extern cvar_t sv_jumpstep;
 
index a80badc1a132030f8e9bd60b38f302d39304b67f..da2675f1752c06f3f5bfbd533c027f109d80de16 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -59,7 +59,6 @@ void SV_Init (void)
        Cvar_RegisterVariable (&sv_idealpitchscale);
        Cvar_RegisterVariable (&sv_aim);
        Cvar_RegisterVariable (&sv_nostep);
-       Cvar_RegisterVariable (&sv_predict);
        Cvar_RegisterVariable (&sv_deltacompress);
        Cvar_RegisterVariable (&sv_cullentities_pvs);
        Cvar_RegisterVariable (&sv_cullentities_portal);
@@ -555,17 +554,7 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg)
                }
 
                VectorCopy(ent->v->angles, angles);
-               if (DotProduct(ent->v->velocity, ent->v->velocity) >= 1.0f)
-               {
-                       VectorMA(ent->v->origin, host_client->latency, ent->v->velocity, origin);
-                       // LordHavoc: trace predicted movement to avoid putting things in walls
-                       trace = SV_Move (ent->v->origin, ent->v->mins, ent->v->maxs, origin, MOVE_NORMAL, ent);
-                       VectorCopy(trace.endpos, origin);
-               }
-               else
-               {
-                       VectorCopy(ent->v->origin, origin);
-               }
+               VectorCopy(ent->v->origin, origin);
 
                // ent has survived every check so far, check if it is visible
                if (ent != clent && ((bits & U_VIEWMODEL) == 0))
@@ -937,17 +926,7 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg)
                }
 
                VectorCopy(ent->v->angles, angles);
-               if (DotProduct(ent->v->velocity, ent->v->velocity) >= 1.0f && host_client->latency >= 0.01f)
-               {
-                       VectorMA(ent->v->origin, host_client->latency, ent->v->velocity, origin);
-                       // LordHavoc: trace predicted movement to avoid putting things in walls
-                       trace = SV_Move (ent->v->origin, ent->v->mins, ent->v->maxs, origin, MOVE_NORMAL, ent);
-                       VectorCopy(trace.endpos, origin);
-               }
-               else
-               {
-                       VectorCopy(ent->v->origin, origin);
-               }
+               VectorCopy(ent->v->origin, origin);
 
                // ent has survived every check so far, check if it is visible
                // always send embedded brush models, they don't generate much traffic
index 2d1b5dd9e0bb513ac15ad60b04863ec9a825da14..23c31cbc27127402cf6460e2c9caa8881619ef47 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 edict_t *sv_player;
 
 cvar_t sv_edgefriction = {0, "edgefriction", "2"};
-cvar_t sv_predict = {0, "sv_predict", "1"};
 cvar_t sv_deltacompress = {0, "sv_deltacompress", "1"};
 cvar_t sv_idealpitchscale = {0, "sv_idealpitchscale","0.8"};
 cvar_t sv_maxspeed = {CVAR_NOTIFY, "sv_maxspeed", "320"};
@@ -472,10 +471,6 @@ void SV_ReadClientMove (usercmd_t *move)
                total += host_client->ping_times[i];
        // can be used for prediction
        host_client->ping = total / NUM_PING_TIMES;
-       host_client->latency = 0;
-       // if paused or a local game, don't predict
-       if (sv_predict.integer && (svs.maxclients > 1) && (!sv.paused))
-               host_client->latency = host_client->ping;
        if ((val = GETEDICTFIELDVALUE(sv_player, eval_ping)))
                val->_float = host_client->ping * 1000.0;