From b61f4cee79ebd67ebd79b7c103e6598bb7cf923d Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 21 Feb 2004 07:43:37 +0000 Subject: [PATCH] cl_fakelocalping cvars now produce the specified ping time (rather than twice it) by lagging each way only 50% of the requested ping git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3915 d7cf8633-e32d-0410-b094-e92efae38249 --- lhnet.c | 4 ++-- todo | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lhnet.c b/lhnet.c index 998c7b08..50dc06f3 100644 --- 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 2b2c5e06..16ff92e4 100644 --- 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) -- 2.39.2