[iortcw] 369/497: All: Remove logically dead code from CL_GetServerStatus

Simon McVittie smcv at debian.org
Fri Sep 8 10:37:30 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit dee9cd8afdfef50e94c401cdc637b7135decf99c
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Mon Jul 13 13:27:48 2015 -0400

    All: Remove logically dead code from CL_GetServerStatus
---
 MP/code/client/cl_main.c | 7 +------
 SP/code/client/cl_main.c | 7 +------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/MP/code/client/cl_main.c b/MP/code/client/cl_main.c
index 283176e..bba48a2 100644
--- a/MP/code/client/cl_main.c
+++ b/MP/code/client/cl_main.c
@@ -179,7 +179,6 @@ typedef struct serverStatus_s
 } serverStatus_t;
 
 serverStatus_t cl_serverStatusList[MAX_SERVERSTATUSREQUESTS];
-int serverStatusCount;
 
 // DHM - Nerve :: Have we heard from the auto-update server this session?
 qboolean autoupdateChecked;
@@ -4568,11 +4567,7 @@ serverStatus_t *CL_GetServerStatus( netadr_t from ) {
 			oldestTime = cl_serverStatusList[i].startTime;
 		}
 	}
-	if (oldest != -1) {
-		return &cl_serverStatusList[oldest];
-	}
-	serverStatusCount++;
-	return &cl_serverStatusList[serverStatusCount & (MAX_SERVERSTATUSREQUESTS-1)];
+	return &cl_serverStatusList[oldest];
 }
 
 /*
diff --git a/SP/code/client/cl_main.c b/SP/code/client/cl_main.c
index ca5671f..45f1d23 100644
--- a/SP/code/client/cl_main.c
+++ b/SP/code/client/cl_main.c
@@ -166,7 +166,6 @@ typedef struct serverStatus_s
 } serverStatus_t;
 
 serverStatus_t cl_serverStatusList[MAX_SERVERSTATUSREQUESTS];
-int serverStatusCount;
 
 #if 0 // MrE defined __USEA3D && defined __A3D_GEOM
 void hA3Dg_ExportRenderGeom( refexport_t *incoming_re );
@@ -4144,11 +4143,7 @@ serverStatus_t *CL_GetServerStatus( netadr_t from ) {
 			oldestTime = cl_serverStatusList[i].startTime;
 		}
 	}
-	if ( oldest != -1 ) {
-		return &cl_serverStatusList[oldest];
-	}
-	serverStatusCount++;
-	return &cl_serverStatusList[serverStatusCount & ( MAX_SERVERSTATUSREQUESTS - 1 )];
+	return &cl_serverStatusList[oldest];
 }
 
 /*

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list