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 3fc9cf7595c6787bb994843d1462f3a76ec5bd61
Author: MAN-AT-ARMS <m4n4t4...@gmail.com>
Date:   Fri Jul 17 08:43:16 2015 -0400

    All: Fix handling too many teams in UI ( Unused )
---
 MP/code/ui/ui_main.c | 12 +++++++-----
 SP/code/ui/ui_main.c | 12 +++++++-----
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/MP/code/ui/ui_main.c b/MP/code/ui/ui_main.c
index f229666..e85163e 100644
--- a/MP/code/ui/ui_main.c
+++ b/MP/code/ui/ui_main.c
@@ -6310,6 +6310,11 @@ static qboolean Team_Parse(char **p) {
        }
 
        if (token[0] == '{') {
+               if (uiInfo.teamCount == MAX_TEAMS) {
+                       uiInfo.teamCount--;
+                       Com_Printf("Too many teams, last team replaced!\n");
+               }
+
          // seven tokens per line, team name and icon, and 5 team member names
          if (!String_Parse(p, &uiInfo.teamList[uiInfo.teamCount].teamName) || 
!String_Parse(p, &tempStr)) {
                return qfalse;
@@ -6331,11 +6336,8 @@ static qboolean Team_Parse(char **p) {
                        }
 
          Com_Printf("Loaded team %s with team icon %s.\n", 
uiInfo.teamList[uiInfo.teamCount].teamName, tempStr);
-         if (uiInfo.teamCount < MAX_TEAMS) {
-               uiInfo.teamCount++;
-         } else {
-               Com_Printf("Too many teams, last team replaced!\n");
-         }
+         uiInfo.teamCount++;
+
          token = COM_ParseExt(p, qtrue);
          if (token[0] != '}') {
                return qfalse;
diff --git a/SP/code/ui/ui_main.c b/SP/code/ui/ui_main.c
index 4546af0..08bf92d 100644
--- a/SP/code/ui/ui_main.c
+++ b/SP/code/ui/ui_main.c
@@ -6079,6 +6079,11 @@ static qboolean Team_Parse(char **p) {
                }
 
                if (token[0] == '{') {
+                       if (uiInfo.teamCount == MAX_TEAMS) {
+                               uiInfo.teamCount--;
+                               Com_Printf("Too many teams, last team 
replaced!\n");
+                       }
+
                        // seven tokens per line, team name and icon, and 5 
team member names
                        if (!String_Parse(p, 
&uiInfo.teamList[uiInfo.teamCount].teamName) || !String_Parse(p, &tempStr)) {
                                return qfalse;
@@ -6100,11 +6105,8 @@ static qboolean Team_Parse(char **p) {
                        }
 
                        Com_Printf("Loaded team %s with team icon %s.\n", 
uiInfo.teamList[uiInfo.teamCount].teamName, tempStr);
-                       if (uiInfo.teamCount < MAX_TEAMS) {
-                               uiInfo.teamCount++;
-                       } else {
-                               Com_Printf("Too many teams, last team 
replaced!\n");
-                       }
+                       uiInfo.teamCount++;
+
                        token = COM_ParseExt(p, qtrue);
                        if (token[0] != '}') {
                                return qfalse;

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

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to