[ioquake3] 119/136: Don't start game entity loops at index 1

Simon McVittie smcv at debian.org
Thu Jun 15 09:09:17 UTC 2017


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

smcv pushed a commit to branch debian/master
in repository ioquake3.

commit 5b9302a7efe480c5ee97f3a5caa20a32d4866252
Author: Zack Middleton <zack at cloemail.com>
Date:   Wed Jun 7 20:32:57 2017 -0500

    Don't start game entity loops at index 1
---
 code/game/g_main.c   | 2 +-
 code/game/g_svcmds.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/code/game/g_main.c b/code/game/g_main.c
index af88d34..0928762 100644
--- a/code/game/g_main.c
+++ b/code/game/g_main.c
@@ -275,7 +275,7 @@ void G_FindTeams( void ) {
 
 	c = 0;
 	c2 = 0;
-	for ( i=1, e=g_entities+i ; i < level.num_entities ; i++,e++ ){
+	for ( i=MAX_CLIENTS, e=g_entities+i ; i < level.num_entities ; i++,e++ ) {
 		if (!e->inuse)
 			continue;
 		if (!e->team)
diff --git a/code/game/g_svcmds.c b/code/game/g_svcmds.c
index 755a7da..3d37715 100644
--- a/code/game/g_svcmds.c
+++ b/code/game/g_svcmds.c
@@ -320,8 +320,8 @@ void	Svcmd_EntityList_f (void) {
 	int			e;
 	gentity_t		*check;
 
-	check = g_entities+1;
-	for (e = 1; e < level.num_entities ; e++, check++) {
+	check = g_entities;
+	for (e = 0; e < level.num_entities ; e++, check++) {
 		if ( !check->inuse ) {
 			continue;
 		}

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



More information about the Pkg-games-commits mailing list