summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Millwood <thebenmachine@gmail.com>2009-10-03 11:46:12 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:19 +0000
commitdbd8fb373a3ebf8db094322bb50f46802b0502cc (patch)
tree1b4b1913fc8521614e686c5f5073248cf4c368d7 /src
parentff6a1995f0303c11e083bd85101bf3b54a30f73b (diff)
* Round thresholds server-side to save bandwidth and prevent server command overflows
* Downgrade weapon anim messages to a warning (because we're not really expecting any to exist) Merge bugs: * Fix human spawn menu * Protocol version 69 (oops!)
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_draw.c4
-rw-r--r--src/game/g_main.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 8e42e4ca..5fcd832a 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -1491,9 +1491,7 @@ static void CG_DrawStageReport( rectDef_t *rect, float text_x, float text_y,
else if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_HUMANS )
{
int credits = cgs.humanNextStageThreshold - cgs.humanCredits;
- //having credits to next stage constantly increasing feels wrong, so
- //we round up to the nearest 100
- credits = (int) (ceil(credits / 100.0f) * 100);
+
if( credits < 0 )
credits = 0;
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 42f07eda..972ad1ef 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -1197,6 +1197,10 @@ void G_CalculateBuildPoints( void )
else
humanNextStageThreshold = -1;
+ // save a lot of bandwidth by rounding thresholds up to the nearest 100
+ alienNextStageThreshold = ceil( (float)alienNextStageThreshold / 100 ) * 100;
+ humanNextStageThreshold = ceil( (float)humanNextStageThreshold / 100 ) * 100;
+
trap_SetConfigstring( CS_STAGES, va( "%d %d %d %d %d %d",
g_alienStage.integer, g_humanStage.integer,
g_alienCredits.integer, g_humanCredits.integer,