From fd01aa605fdab1d214860c9fac905155fda31fc1 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 2 Apr 2006 23:52:05 +0000 Subject: [PATCH] Hrm, must have not saved before committing these. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2152 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_main.c | 2 +- engine/client/cl_parse.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 286ceea95..07cbb10e8 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -119,7 +119,7 @@ cvar_t allow_download_csprogs = SCVAR("allow_download_csprogs", "0"); cvar_t cl_muzzleflash = SCVAR("cl_muzzleflash", "1"); cvar_t cl_item_bobbing = SCVAR("cl_model_bobbing", "0"); -cvar_t cl_countpendingpl = SCVAR("cl_countpendingpl", "1"); +cvar_t cl_countpendingpl = SCVAR("cl_countpendingpl", "0"); cvar_t requiredownloads = SCVARF("requiredownloads","1", CVAR_ARCHIVE); cvar_t cl_standardchat = SCVARF("cl_standardchat", "0", CVAR_ARCHIVE); diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index a0e577f6d..c7149dab8 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -248,7 +248,7 @@ int CL_CalcNet (void) lost++; } - if (cl_countpendingpl.value) + if (!cl_countpendingpl.value) { pending = cls.netchan.outgoing_sequence - cls.netchan.incoming_sequence - 1; lost -= pending; @@ -263,7 +263,12 @@ int CL_CalcNet (void) percent = 1; } else - percent = lost * 100 / sent; + { + if (sent < 1) + percent = 100; //shouldn't ever happen. + else + percent = lost * 100 / sent; + } return percent; }