From 46597646d10f73154d805b0bfe0524d414f29acf Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 2 Mar 2007 15:33:59 +0000 Subject: [PATCH] less hacky solution to resetting movesequence on a level change git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6931 d7cf8633-e32d-0410-b094-e92efae38249 --- sv_main.c | 10 ++++++++++ sv_user.c | 14 -------------- todo | 2 +- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/sv_main.c b/sv_main.c index 0bebd163..c9a237a4 100644 --- a/sv_main.c +++ b/sv_main.c @@ -447,6 +447,16 @@ void SV_SendServerinfo (client_t *client) MSG_WriteByte (&client->netconnection->message, 1); client->spawned = false; // need prespawn, spawn, etc + + // clear movement info until client enters the new level properly + memset(&client->cmd, 0, sizeof(client->cmd)); + client->movesequence = 0; +#ifdef NUM_PING_TIMES + for (i = 0;i < NUM_PING_TIMES;i++) + client->ping_times[i] = 0; + client->num_pings = 0; +#endif + client->ping = 0; } /* diff --git a/sv_user.c b/sv_user.c index ce1fcf17..f4ea2cff 100644 --- a/sv_user.c +++ b/sv_user.c @@ -445,20 +445,6 @@ void SV_ReadClientMove (void) usercmd_t newmove; usercmd_t *move = &newmove; - // reset stale client move state if a level change has occurred - if (host_client->cmd.receivetime > sv.time + 0.1 || !host_client->spawned) - { - memset(&host_client->cmd, 0, sizeof(host_client->cmd)); - host_client->movesequence = 0; -#ifdef NUM_PING_TIMES - for (i=0;i < NUM_PING_TIMES;i++) - host_client->ping_times[i] = 0; - host_client->num_pings = 0; -#endif - host_client->ping = 0; - host_client->clmovement_disabletimeout = realtime + 0.1; - } - memset(move, 0, sizeof(*move)); if (msg_badread) Con_Printf("SV_ReadClientMessage: badread at %s:%i\n", __FILE__, __LINE__); diff --git a/todo b/todo index ef0ea44c..f5325af4 100644 --- a/todo +++ b/todo @@ -62,7 +62,6 @@ -f bug darkplaces physics: GAME_TAOV: Vigil's movement isn't working properly, the qc uses MOVETYPE_STEP and clears FL_ONGROUND every frame and moves using velocity, this is causing a landing sound every frame and causing the player to slide down minor slopes very quickly, this did not occur in Quake, and seems that it must be related to a velocity_z check or FL_ONGROUND check in the MOVETYPE_STEP physics code (RenegadeC, xaGe) 0 bug darkplaces client: can't move mouse around in nexuiz menu if vid_mouse is 0 0 bug darkplaces client: it has been reported that sometimes level changes on quakeworld servers don't load a map, this may be related to downloading? (Baker) -0 bug darkplaces client: name (and probably other userinfo properties) are not being set when entering a qw server? 0 bug darkplaces client: when going through a teleporter the cl_movement prediction still interpolates the move (div0) 0 bug darkplaces docs: host_maxfps is gone, correct the darkplaces.txt and host.c cvar description for host_framerate 0 bug darkplaces loader: make rtlight entity loader support q3map/q3map2 lights properly, they use a spawnflag for LINEAR mode, by default they use 1/(x*x) falloff (Carni, motorsep) @@ -533,6 +532,7 @@ d bug darkplaces client: make "wait" command wait fornext network frame somehow d bug darkplaces client: make envmap command work with the corrected layout d bug darkplaces client: make server queries use a queue to avoid flooding out queries too fast (Willis) d bug darkplaces client: missing bolt/beam models should not produce warnings +d bug darkplaces client: name (and probably other userinfo properties) are not being set when entering a qw server? d bug darkplaces client: on crctf proquake servers the scoreboard does not contain exactly matching player names (READY is sometimes appended), the ping report and status parsing should ignore text after the player name d bug darkplaces client: quakeworld servers often stuffcmd the cvars topcolor, bottomcolor, pants, team, skin, noaim, so commands for these need to be added (topcolor/bottomcolor will modify _cl_color, the others can be real cvars) d bug darkplaces client: seta commands create cvars that are not saved to config because they match their 'default' value -- 2.39.2