Index: server/DataAccess.cpp
===================================================================
--- server/DataAccess.cpp	(revision 306758ef5412fe59b4375b110891389459409b21)
+++ server/DataAccess.cpp	(revision 7fa452f8af7ba8638ce8e776a26d0fa48eccedd2)
@@ -180,5 +180,5 @@
    // the columns are result, team, blue score, and red score
    // for result 0 is defeat and 1 is victory
-   // for team, 0 is blue and 1 is red
+   // for team, 1 is blue and 2 is red
 
    MYSQL_RES *result;
@@ -205,10 +205,10 @@
 
       if (blueScore == 3) {
-         if (userTeam == 0)
+         if (userTeam == 1)
             gameResult = 1;
          else
             gameResult = 0;
       }else if (redScore == 3) {
-         if (userTeam == 1)
+         if (userTeam == 2)
             gameResult = 1;
          else
Index: server/server.cpp
===================================================================
--- server/server.cpp	(revision 306758ef5412fe59b4375b110891389459409b21)
+++ server/server.cpp	(revision 7fa452f8af7ba8638ce8e776a26d0fa48eccedd2)
@@ -139,8 +139,8 @@
                   switch (p->team)
                   {
-                  case 0:// blue team
+                  case 1:// blue team
                      spawnPos = p->currentGame->getMap()->getStructureLocation(STRUCTURE_BLUE_FLAG);
                      break;
-                  case 1:// red team
+                  case 2:// red team
                      spawnPos = p->currentGame->getMap()->getStructureLocation(STRUCTURE_RED_FLAG);
                      break;
@@ -191,7 +191,7 @@
                int winningTeam = -1;
                if (game->getBlueScore() == 3)
-                  winningTeam = 0;
+                  winningTeam = 1;
                else if (game->getRedScore() == 3)
-                  winningTeam = 1;
+                  winningTeam = 2;
 
                if (winningTeam == -1)
@@ -780,5 +780,5 @@
          map<unsigned int, Player*>& oldPlayers = g->getPlayers();
          g->addPlayer(p);
-         p->team = -1;
+         p->team = 0;
 
          // send info to other players
@@ -921,5 +921,5 @@
          case STRUCTURE_BLUE_FLAG:
          {
-            if (p->team == 0 && p->hasRedFlag) {
+            if (p->team == 1 && p->hasRedFlag) {
                // check that your flag is at your base
                pos = game->getMap()->getStructureLocation(STRUCTURE_BLUE_FLAG);
@@ -950,5 +950,5 @@
          case STRUCTURE_RED_FLAG:
          {
-            if (p->team == 1 && p->hasBlueFlag) {
+            if (p->team == 2 && p->hasBlueFlag) {
                // check that your flag is at your base
                pos = game->getMap()->getStructureLocation(STRUCTURE_RED_FLAG);
@@ -1047,9 +1047,9 @@
 
          if (posDistance(p->pos, pos.toFloat()) < 10) {
-            if (p->team == 0 && itObjects->type == OBJECT_BLUE_FLAG) {
+            if (p->team == 1 && itObjects->type == OBJECT_BLUE_FLAG) {
                structPos = game->getMap()->getStructureLocation(STRUCTURE_BLUE_FLAG);
                flagReturned = true;
                break;
-            } else if (p->team == 1 && itObjects->type == OBJECT_RED_FLAG) {
+            } else if (p->team == 2 && itObjects->type == OBJECT_RED_FLAG) {
                structPos = game->getMap()->getStructureLocation(STRUCTURE_RED_FLAG);
                flagReturned = true;
