]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
cl_fakelocalping cvars now produce the specified ping time (rather than twice it...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 21 Feb 2004 07:43:37 +0000 (07:43 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 21 Feb 2004 07:43:37 +0000 (07:43 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3915 d7cf8633-e32d-0410-b094-e92efae38249

lhnet.c
todo

diff --git a/lhnet.c b/lhnet.c
index 998c7b08686c43fd5e65fcea977b1a2511347e00..50dc06f366ec158190cabcbb67179b46b9f3cef1 100644 (file)
--- a/lhnet.c
+++ b/lhnet.c
@@ -672,8 +672,8 @@ int LHNET_Write(lhnetsocket_t *lhnetsocket, const void *content, int contentleng
                p->next->prev = p;
                p->prev->next = p;
 #ifndef STANDALONETEST
-               if (cl_fakelocalping_min.integer || cl_fakelocalping_max.integer)
-                       p->sentdoubletime = Sys_DoubleTime() + (cl_fakelocalping_min.integer + ((cl_fakelocalping_max.integer - cl_fakelocalping_min.integer) * (rand() & 255) / 256)) / 1000.0;
+               if (cl_fakelocalping_min.value || cl_fakelocalping_max.value)
+                       p->sentdoubletime = Sys_DoubleTime() + lhrandom(cl_fakelocalping_min.value, cl_fakelocalping_max.value) * (0.5 / 1000.0);
 #endif
                value = contentlength;
        }
diff --git a/todo b/todo
index 2b2c5e061d7c18d505757d0ef0cec834f0738ae1..16ff92e4494a0064617d6320a6aeda6bc41bf516 100644 (file)
--- a/todo
+++ b/todo
@@ -35,7 +35,7 @@
 -n darkplaces: server is starting before the "port" cvar is set by commandline and scripts? (yummyluv)
 -n darkplaces: typing ip in join game menu should show 'trying' and 'no response' after a while, or 'no network' if networking is not initialized (yummyluv)
 -n dpmod: make grapple off-hand (joe hill)
-0 darkplaces: change cl_fakelocalping_min and _max to only lag by half each way, as currently it results in 2x ping
+d darkplaces: change cl_fakelocalping_min and _max to only lag by half each way, as currently it results in 2x ping
 0 darkplaces: make MAX_PACKETFRAGMENT a property of each net connection, so memory loopbacks could use huge limits (Sajt)
 d darkplaces: add extension for tenebrae dlight entities
 0 darkplaces: fix broken mouse button display in key binding menu, it shows ??? for mouse buttons (Mercury, Tomaz)