]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/translate_colors_2
authorterencehill <piuntn@gmail.com>
Sun, 13 Mar 2016 13:13:44 +0000 (14:13 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 13 Mar 2016 13:13:44 +0000 (14:13 +0100)
1  2 
qcsrc/common/teams.qh

diff --combined qcsrc/common/teams.qh
index 8e09a58ebf201160fef6338dc254fa4e2ab8114c,0c0dd7568790ac5955f196249cdec79cc8440ac9..3dd50ee88044129ca4dd8129006dd921cf96fa82
@@@ -47,12 -47,12 +47,12 @@@ float myteam
  
  string Team_ColorCode(float teamid)
  {
 -    switch(teamid)
 -    {
 +      switch(teamid)
 +      {
                case NUM_TEAM_1: return COL_TEAM_1;
 -      case NUM_TEAM_2: return COL_TEAM_2;
 -      case NUM_TEAM_3: return COL_TEAM_3;
 -      case NUM_TEAM_4: return COL_TEAM_4;
 +              case NUM_TEAM_2: return COL_TEAM_2;
 +              case NUM_TEAM_3: return COL_TEAM_3;
 +              case NUM_TEAM_4: return COL_TEAM_4;
        }
  
        return "^7";
@@@ -73,12 -73,12 +73,12 @@@ vector Team_ColorRGB(float teamid
  
  string Team_ColorName(float teamid)
  {
 -    switch(teamid)
 -    {
 +      switch(teamid)
 +      {
                case NUM_TEAM_1: return NAME_TEAM_1;
 -      case NUM_TEAM_2: return NAME_TEAM_2;
 -      case NUM_TEAM_3: return NAME_TEAM_3;
 -      case NUM_TEAM_4: return NAME_TEAM_4;
 +              case NUM_TEAM_2: return NAME_TEAM_2;
 +              case NUM_TEAM_3: return NAME_TEAM_3;
 +              case NUM_TEAM_4: return NAME_TEAM_4;
        }
  
      return NAME_NEUTRAL;
  // used for replacement in filenames or such where the name CANNOT be allowed to be translated
  string Static_Team_ColorName(float teamid)
  {
 -    switch(teamid)
 -    {
 +      switch(teamid)
 +      {
                case NUM_TEAM_1: return STATIC_NAME_TEAM_1;
 -      case NUM_TEAM_2: return STATIC_NAME_TEAM_2;
 -      case NUM_TEAM_3: return STATIC_NAME_TEAM_3;
 -      case NUM_TEAM_4: return STATIC_NAME_TEAM_4;
 +              case NUM_TEAM_2: return STATIC_NAME_TEAM_2;
 +              case NUM_TEAM_3: return STATIC_NAME_TEAM_3;
 +              case NUM_TEAM_4: return STATIC_NAME_TEAM_4;
        }
  
      return NAME_NEUTRAL;
@@@ -103,10 -103,10 +103,10 @@@ float Team_ColorToTeam(string team_colo
        switch(strtolower(team_color))
        {
                case "red": return NUM_TEAM_1;
 -      case "blue": return NUM_TEAM_2;
 -      case "yellow": return NUM_TEAM_3;
 -      case "pink": return NUM_TEAM_4;
 -      case "auto": return 0;
 +              case "blue": return NUM_TEAM_2;
 +              case "yellow": return NUM_TEAM_3;
 +              case "pink": return NUM_TEAM_4;
 +              case "auto": return 0;
        }
  
        return -1;
@@@ -164,9 -164,4 +164,4 @@@ float Team_TeamToNumber(float teamid
  #define SAME_TEAM(a,b) (teamplay ? (a.team == b.team) : (a == b))
  #define DIFF_TEAM(a,b) (teamplay ? (a.team != b.team) : (a != b))
  
- // used for notification system multi-team identifiers
- #define APP_TEAM_NUM_2(num,prefix) ((num == NUM_TEAM_1) ? prefix##RED : prefix##BLUE)
- #define APP_TEAM_NUM_4(num,prefix) ((num == NUM_TEAM_1) ? prefix##RED : ((num == NUM_TEAM_2) ? prefix##BLUE : ((num == NUM_TEAM_3) ? prefix##YELLOW : prefix##PINK)))
- #define APP_TEAM_ENT_2(ent,prefix) ((ent.team == NUM_TEAM_1) ? prefix##RED : prefix##BLUE)
- #define APP_TEAM_ENT_4(ent,prefix) ((ent.team == NUM_TEAM_1) ? prefix##RED : ((ent.team == NUM_TEAM_2) ? prefix##BLUE : ((ent.team == NUM_TEAM_3) ? prefix##YELLOW : prefix##PINK)))
  #endif