Merge remote-tracking branch 'origin/master' into samual/combined_updates
authorSamual Lenks <samual@xonotic.org>
Mon, 13 Jan 2014 16:42:58 +0000 (11:42 -0500)
committerSamual Lenks <samual@xonotic.org>
Mon, 13 Jan 2014 16:42:58 +0000 (11:42 -0500)
Conflicts:
qcsrc/common/util.qh
qcsrc/menu/xonotic/dialog_multiplayer_create.c

24 files changed:
1  2 
defaultXonotic.cfg
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/progs.src
qcsrc/common/mapinfo.qc
qcsrc/common/mapinfo.qh
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/menu/classes.c
qcsrc/menu/menu.qc
qcsrc/menu/progs.src
qcsrc/menu/xonotic/dialog_multiplayer_create.c
qcsrc/menu/xonotic/mainwindow.c
qcsrc/menu/xonotic/serverlist.c
qcsrc/menu/xonotic/util.qc
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/vote.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/progs.src

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -35,48 -33,51 +35,51 @@@ entity MapInfo_Type_last
  #define IS_GAMETYPE(NAME) \
        (MapInfo_LoadedGametype == MAPINFO_TYPE_##NAME)
  
 -REGISTER_GAMETYPE(_("Deathmatch"),dm,g_dm,DEATHMATCH,"timelimit=20 pointlimit=30 leadlimit=0");
 +REGISTER_GAMETYPE(_("Deathmatch"),dm,g_dm,DEATHMATCH,FALSE,"timelimit=20 pointlimit=30 leadlimit=0");
  #define g_dm IS_GAMETYPE(DEATHMATCH)
  
 -REGISTER_GAMETYPE(_("Last Man Standing"),lms,g_lms,LMS,"timelimit=20 lives=9 leadlimit=0");
 +REGISTER_GAMETYPE(_("Last Man Standing"),lms,g_lms,LMS,FALSE,"timelimit=20 lives=9 leadlimit=0");
  #define g_lms IS_GAMETYPE(LMS)
  
 -REGISTER_GAMETYPE(_("Race"),rc,g_race,RACE,"timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0");
 +REGISTER_GAMETYPE(_("Race"),rc,g_race,RACE,FALSE,"timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0");
  #define g_race IS_GAMETYPE(RACE)
  
 -REGISTER_GAMETYPE(_("Race CTS"),cts,g_cts,CTS,"timelimit=20 skill=-1");
 +REGISTER_GAMETYPE(_("Race CTS"),cts,g_cts,CTS,FALSE,"timelimit=20 skill=-1");
  #define g_cts IS_GAMETYPE(CTS)
  
 -REGISTER_GAMETYPE(_("Team Deathmatch"),tdm,g_tdm,TEAM_DEATHMATCH,"timelimit=20 pointlimit=50 teams=2 leadlimit=0");
 +REGISTER_GAMETYPE(_("Team Deathmatch"),tdm,g_tdm,TEAM_DEATHMATCH,TRUE,"timelimit=20 pointlimit=50 teams=2 leadlimit=0");
  #define g_tdm IS_GAMETYPE(TEAM_DEATHMATCH)
  
 -REGISTER_GAMETYPE(_("Capture the Flag"),ctf,g_ctf,CTF,"timelimit=20 caplimit=10 leadlimit=0");
 +REGISTER_GAMETYPE(_("Capture the Flag"),ctf,g_ctf,CTF,TRUE,"timelimit=20 caplimit=10 leadlimit=0");
  #define g_ctf IS_GAMETYPE(CTF)
  
 -REGISTER_GAMETYPE(_("Clan Arena"),ca,g_ca,CA,"timelimit=20 pointlimit=10 leadlimit=0");
 +REGISTER_GAMETYPE(_("Clan Arena"),ca,g_ca,CA,TRUE,"timelimit=20 pointlimit=10 leadlimit=0");
  #define g_ca IS_GAMETYPE(CA)
  
 -REGISTER_GAMETYPE(_("Domination"),dom,g_domination,DOMINATION,"timelimit=20 pointlimit=200 teams=2 leadlimit=0");
 +REGISTER_GAMETYPE(_("Domination"),dom,g_domination,DOMINATION,TRUE,"timelimit=20 pointlimit=200 teams=2 leadlimit=0");
  #define g_domination IS_GAMETYPE(DOMINATION)
  
 -REGISTER_GAMETYPE(_("Key Hunt"),kh,g_keyhunt,KEYHUNT,"timelimit=20 pointlimit=1000 teams=3 leadlimit=0");
 +REGISTER_GAMETYPE(_("Key Hunt"),kh,g_keyhunt,KEYHUNT,TRUE,"timelimit=20 pointlimit=1000 teams=3 leadlimit=0");
  #define g_keyhunt IS_GAMETYPE(KEYHUNT)
  
 -REGISTER_GAMETYPE(_("Assault"),as,g_assault,ASSAULT,"timelimit=20");
 +REGISTER_GAMETYPE(_("Assault"),as,g_assault,ASSAULT,TRUE,"timelimit=20");
  #define g_assault IS_GAMETYPE(ASSAULT)
  
 -REGISTER_GAMETYPE(_("Onslaught"),ons,g_onslaught,ONSLAUGHT,"timelimit=20");
 +REGISTER_GAMETYPE(_("Onslaught"),ons,g_onslaught,ONSLAUGHT,TRUE,"timelimit=20");
  #define g_onslaught IS_GAMETYPE(ONSLAUGHT)
  
 -REGISTER_GAMETYPE(_("Nexball"),nb,g_nexball,NEXBALL,"timelimit=20 pointlimit=5 leadlimit=0");
 +REGISTER_GAMETYPE(_("Nexball"),nb,g_nexball,NEXBALL,TRUE,"timelimit=20 pointlimit=5 leadlimit=0");
  #define g_nexball IS_GAMETYPE(NEXBALL)
  
 -REGISTER_GAMETYPE(_("Freeze Tag"),ft,g_freezetag,FREEZETAG,"timelimit=20 pointlimit=10 teams=2 leadlimit=0");
 +REGISTER_GAMETYPE(_("Freeze Tag"),ft,g_freezetag,FREEZETAG,TRUE,"timelimit=20 pointlimit=10 teams=2 leadlimit=0");
  #define g_freezetag IS_GAMETYPE(FREEZETAG)
  
 -REGISTER_GAMETYPE(_("Keepaway"),ka,g_keepaway,KEEPAWAY,"timelimit=20 pointlimit=30");
 +REGISTER_GAMETYPE(_("Keepaway"),ka,g_keepaway,KEEPAWAY,FALSE,"timelimit=20 pointlimit=30");
  #define g_keepaway IS_GAMETYPE(KEEPAWAY)
  
+ REGISTER_GAMETYPE(_("Invasion"),inv,g_invasion,INVASION,"pointlimit=5");
+ #define g_invasion IS_GAMETYPE(INVASION)
  const float MAPINFO_FEATURE_WEAPONS       = 1; // not defined for minstagib-only maps
  const float MAPINFO_FEATURE_VEHICLES      = 2;
  const float MAPINFO_FEATURE_TURRETS       = 4;
Simple merge
@@@ -368,8 -367,15 +368,15 @@@ void FindConnectedComponent(entity e, .
  // expand multiple arguments into one argument by stripping parenthesis
  #define XPD(...) __VA_ARGS__
  
- void backtrace(string msg);
+ // Some common varargs functions. Lowercase as they match C.
+ #define printf(...) print(sprintf(__VA_ARGS__))
+ #define dprintf(...) dprint(sprintf(__VA_ARGS__))
+ #define fprintf(file, ...) fputs(file, sprintf(__VA_ARGS__))
+ #define bprintf(...) bprint(sprintf(__VA_ARGS__))
  
 -#ifndef MENUQC
++//#ifndef MENUQC
+ void backtrace(string msg);
 -#endif
++//#endif
  
  // color code replace, place inside of sprintf and parse the string... defaults described as constants
  // foreground/normal colors
Simple merge
Simple merge
Simple merge
@@@ -173,42 -143,25 +173,43 @@@ void XonoticServerCreateTab_gameTypeCha
  {
        // tell the map list to update
        float gt;
 -      entity e, l, l2;
 +      entity e, l;
        gt = MapInfo_CurrentGametype();
        e = me.sliderFraglimit;
 -      l = me.checkboxFraglimit;
 -      l2 = me.checkboxFraglimitMapinfo;
 +      l = me.labelFraglimit;
 +
        switch(gt)
        {
 -              case MAPINFO_TYPE_CTF:        GameType_ConfigureSliders(e, l, l2, _("Capture limit:"),   1,   20, 1, "capturelimit_override");     break;
 -              case MAPINFO_TYPE_DOMINATION: GameType_ConfigureSliders(e, l, l2, _("Point limit:"),    50,  500, 10, "g_domination_point_limit"); break;
 -              case MAPINFO_TYPE_KEYHUNT:    GameType_ConfigureSliders(e, l, l2, _("Point limit:"),   200, 1500, 50, "g_keyhunt_point_limit");    break;
 -              case MAPINFO_TYPE_LMS:        GameType_ConfigureSliders(e, l, l2, _("Lives:"),           3,   50,  1, "g_lms_lives_override");     break;
 -              case MAPINFO_TYPE_RACE:       GameType_ConfigureSliders(e, l, l2, _("Laps:"),            1,   25,  1, "g_race_laps_limit");        break;
 -              case MAPINFO_TYPE_NEXBALL:    GameType_ConfigureSliders(e, l, l2, _("Goals:"),           1,   50,  1, "g_nexball_goallimit");      break;
 -              case MAPINFO_TYPE_ASSAULT:    GameType_ConfigureSliders(e, l, l2, _("Point limit:"),    50,  500, 10, "");                         break;
 -              case MAPINFO_TYPE_ONSLAUGHT:  GameType_ConfigureSliders(e, l, l2, _("Point limit:"),    50,  500, 10, "");                         break;
 -              case MAPINFO_TYPE_CTS:        GameType_ConfigureSliders(e, l, l2, _("Point limit:"),    50,  500, 10, "");                         break;
 -              case MAPINFO_TYPE_INVASION:   GameType_ConfigureSliders(e, l, l2, _("Point limit:"),     5,    0,  5, "");                         break;
 -              default:                      GameType_ConfigureSliders(e, l, l2, _("Frag limit:"),      5,  100,  5, "fraglimit_override");       break;
 +              case MAPINFO_TYPE_CTF:        GameType_ConfigureSliders(e, l, _("Capture limit:"),   1,   20, 1, "capturelimit_override");     break;
 +              case MAPINFO_TYPE_DOMINATION: GameType_ConfigureSliders(e, l, _("Point limit:"),    50,  500, 10, "g_domination_point_limit"); break;
 +              case MAPINFO_TYPE_KEYHUNT:    GameType_ConfigureSliders(e, l, _("Point limit:"),   200, 1500, 50, "g_keyhunt_point_limit");    break;
 +              case MAPINFO_TYPE_LMS:        GameType_ConfigureSliders(e, l, _("Lives:"),           3,   50,  1, "g_lms_lives_override");     break;
 +              case MAPINFO_TYPE_RACE:       GameType_ConfigureSliders(e, l, _("Laps:"),            1,   25,  1, "g_race_laps_limit");        break;
 +              case MAPINFO_TYPE_NEXBALL:    GameType_ConfigureSliders(e, l, _("Goals:"),           1,   50,  1, "g_nexball_goallimit");      break;
 +              case MAPINFO_TYPE_ASSAULT:    GameType_ConfigureSliders(e, l, _("Point limit:"),    50,  500, 10, "");                         break;
 +              case MAPINFO_TYPE_ONSLAUGHT:  GameType_ConfigureSliders(e, l, _("Point limit:"),    50,  500, 10, "");                         break;
 +              case MAPINFO_TYPE_CTS:        GameType_ConfigureSliders(e, l, _("Point limit:"),    50,  500, 10, "");                         break;
++              case MAPINFO_TYPE_INVASION:   GameType_ConfigureSliders(e, l, _("Point limit:"),     5,    0,  5, "");                         break;
 +              default:                      GameType_ConfigureSliders(e, l, _("Frag limit:"),      5,  100,  5, "fraglimit_override");       break;
        }
 +
 +      float x = FALSE;
 +      e = me.sliderTeams;
 +      switch(gt)
 +      {
 +              case MAPINFO_TYPE_CA:               x = TRUE; e.configureXonoticTextSlider(e, "g_ca_teams_override");          break;
 +              case MAPINFO_TYPE_DOMINATION:       x = TRUE; e.configureXonoticTextSlider(e, "g_domination_teams_override");  break;
 +              case MAPINFO_TYPE_FREEZETAG:        x = TRUE; e.configureXonoticTextSlider(e, "g_freezetag_teams_override");   break;
 +              case MAPINFO_TYPE_KEEPAWAY:         x = TRUE; e.configureXonoticTextSlider(e, "g_keepaway_teams_override");    break;
 +              case MAPINFO_TYPE_KEYHUNT:          x = TRUE; e.configureXonoticTextSlider(e, "g_keyhunt_teams_override");     break;
 +              case MAPINFO_TYPE_TEAM_DEATHMATCH:  x = TRUE; e.configureXonoticTextSlider(e, "g_tdm_teams_override");         break;
 +
 +              default: x = FALSE; e.configureXonoticTextSlider(e, string_null); break;
 +      }
 +      e.configureXonoticTextSliderValues(e);
 +      e.value = 0;
 +      me.sliderTeams.disabled = me.labelTeams.disabled = !x;
 +
        me.mapListBox.refilter(me.mapListBox);
  }
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -42,8 -45,9 +45,9 @@@ mutators/gamemode_ctf.q
  mutators/gamemode_domination.qh
  mutators/gamemode_keyhunt.qh // TODO fix this
  mutators/gamemode_keepaway.qh
 -mutators/gamemode_nexball.qh 
 +mutators/gamemode_nexball.qh
  mutators/gamemode_lms.qh
+ mutators/gamemode_invasion.qh
  mutators/mutator_dodging.qh
  mutators/mutator_nades.qh