Merge branch 'terencehill/obsolete_cvars_removal' into 'master'
authorMario <zacjardine@y7mail.com>
Sun, 23 Aug 2015 12:39:11 +0000 (12:39 +0000)
committerMario <zacjardine@y7mail.com>
Sun, 23 Aug 2015 12:39:11 +0000 (12:39 +0000)
Remove obsolete sv_fraginfo* cvars

See merge request !176

1  2 
defaultXonotic.cfg
qcsrc/server/g_world.qc

diff --combined defaultXonotic.cfg
@@@ -234,12 -234,10 +234,12 @@@ seta cl_hitsound_nom_damage 25 "damage 
  seta cl_eventchase_death 1 "camera goes into 3rd person mode when the player is dead; set to 2 to active the effect only when the corpse doesn't move anymore"
  seta cl_eventchase_nexball 1 "camera goes into 3rd person mode when in nexball game-mode"
  seta cl_eventchase_distance 140 "final camera distance"
 +seta cl_eventchase_generator_distance 400 "final camera distance while viewing generator explosion"
  seta cl_eventchase_speed 1.3 "how fast the camera slides back, 0 is instant"
  seta cl_eventchase_maxs "12 12 8" "max size of eventchase camera bbox"
  seta cl_eventchase_mins "-12 -12 -8" "min size of eventchase camera bbox"
  seta cl_eventchase_viewoffset "0 0 20" "viewoffset of eventchase camera"
 +seta cl_eventchase_generator_viewoffset "0 0 80" "viewoffset of eventchase camera while viewing generator explosion"
  
  //nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
  set teamplay_lockonrestart 0 "it set to 1 in a team-based game, the teams are locked once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
@@@ -290,12 -288,6 +290,6 @@@ set cl_deathglow 0.8 "number of second
  
  set sv_gibhealth 100 "Minus health a dead body must have in order to get gibbed"
  
- // fragmessage: This allows extra information to be displayed with the frag centerprints.
- set sv_fraginfo 1 "Enable extra frag message information, 0 = Never display, 1 = Display only in warmup mode; 2 = Always display"
- set sv_fraginfo_ping 1 "Enable ping display information, 0 = Never display, 1 = Always display (If the player is a bot, it will say bot instead of the ping.)"
- set sv_fraginfo_handicap 1 "Enable handicap display information, 0 = Never display, 1 = Only when the player has handicap on, 2 = Always display (Displays Off if disabled)"
- set sv_fraginfo_stats 1 "Enable statistics (health/armor) display information, 0 = Never display, 1 = Always display (Only available for the person who was killed)"
  // use default physics
  set sv_friction_on_land 0
  set sv_friction_slick 0.5
diff --combined qcsrc/server/g_world.qc
  #include "../common/buffs.qh"
  #include "../common/constants.qh"
  #include "../common/deathtypes.qh"
 +#include "../common/effects.qh"
  #include "../common/mapinfo.qh"
  #include "../common/monsters/all.qh"
  #include "../common/monsters/sv_monsters.qh"
 +#include "../common/vehicles/all.qh"
  #include "../common/notifications.qh"
  #include "../common/playerstats.qh"
  #include "../common/stats.qh"
@@@ -336,7 -334,6 +336,6 @@@ void cvar_changes_init(
                BADCVAR("pausable");
                BADCVAR("sv_allow_fullbright");
                BADCVAR("sv_checkforpacketsduringsleep");
-               BADCVAR("sv_fraginfo");
                BADCVAR("sv_timeout");
                BADPREFIX("sv_timeout_");
                BADPREFIX("crypto_");
                BADPREFIX("prvm_");
                BADPREFIX("skill_");
                BADPREFIX("sv_cullentities_");
-               BADPREFIX("sv_fraginfo_");
                BADPREFIX("sv_maxidle_");
                BADPREFIX("sv_vote_");
                BADPREFIX("timelimit_");
@@@ -561,11 -557,13 +559,11 @@@ void spawnfunc___init_dedicated_server(
        self.classname = "worldspawn"; // safeguard against various stuff ;)
  
        // needs to be done so early because of the constants they create
 -      CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
 -      CALL_ACCUMULATED_FUNCTION(RegisterMonsters);
 -      CALL_ACCUMULATED_FUNCTION(RegisterItems);
 -      CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
 +      static_init();
 +      CALL_ACCUMULATED_FUNCTION(RegisterTurrets);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
 -      CALL_ACCUMULATED_FUNCTION(RegisterBuffs);
 +      CALL_ACCUMULATED_FUNCTION(RegisterEffects);
  
        MapInfo_Enumerate();
        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
@@@ -610,11 -608,13 +608,11 @@@ void spawnfunc_worldspawn (void
        server_is_dedicated = (stof(cvar_defstring("is_dedicated")) ? true : false);
  
        // needs to be done so early because of the constants they create
 -      CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
 -      CALL_ACCUMULATED_FUNCTION(RegisterMonsters);
 -      CALL_ACCUMULATED_FUNCTION(RegisterItems);
 -      CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
 +      static_init();
 +      CALL_ACCUMULATED_FUNCTION(RegisterTurrets);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
 -      CALL_ACCUMULATED_FUNCTION(RegisterBuffs);
 +      CALL_ACCUMULATED_FUNCTION(RegisterEffects);
  
        ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid));
  
                GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));
                s = ":gameinfo:mutators:LIST";
  
 -              ret_string = s;
 -              MUTATOR_CALLHOOK(BuildMutatorsString);
 +              MUTATOR_CALLHOOK(BuildMutatorsString, s);
                s = ret_string;
  
                // simple, probably not good in the mutator system
@@@ -1705,6 -1706,48 +1703,6 @@@ void ClearWinners(void
                head.winning = 0;
  }
  
 -// Onslaught winning condition:
 -// game terminates if only one team has a working generator (or none)
 -float WinningCondition_Onslaught()
 -{
 -      entity head;
 -      float t1, t2, t3, t4;
 -
 -      WinningConditionHelper(); // set worldstatus
 -
 -      if(warmup_stage)
 -              return WINNING_NO;
 -
 -      // first check if the game has ended
 -      t1 = t2 = t3 = t4 = 0;
 -      head = find(world, classname, "onslaught_generator");
 -      while (head)
 -      {
 -              if (head.health > 0)
 -              {
 -                      if (head.team == NUM_TEAM_1) t1 = 1;
 -                      if (head.team == NUM_TEAM_2) t2 = 1;
 -                      if (head.team == NUM_TEAM_3) t3 = 1;
 -                      if (head.team == NUM_TEAM_4) t4 = 1;
 -              }
 -              head = find(head, classname, "onslaught_generator");
 -      }
 -      if (t1 + t2 + t3 + t4 < 2)
 -      {
 -              // game over, only one team remains (or none)
 -              ClearWinners();
 -              if (t1) SetWinners(team, NUM_TEAM_1);
 -              if (t2) SetWinners(team, NUM_TEAM_2);
 -              if (t3) SetWinners(team, NUM_TEAM_3);
 -              if (t4) SetWinners(team, NUM_TEAM_4);
 -              dprint("Have a winner, ending game.\n");
 -              return WINNING_YES;
 -      }
 -
 -      // Two or more teams remain
 -      return WINNING_NO;
 -}
 -
  // Assault winning condition: If the attackers triggered a round end (by fulfilling all objectives)
  // they win. Otherwise the defending team wins once the timelimit passes.
  void assault_new_round();
@@@ -2073,6 -2116,9 +2071,6 @@@ void CheckRules_World(
                return;
        }
  
 -      if(g_onslaught)
 -              timelimit = 0; // ONS has its own overtime rule
 -
        float wantovertime;
        wantovertime = 0;
  
        {
                checkrules_status = WinningCondition_LMS();
        }
 -      else if (g_onslaught)
 -      {
 -              checkrules_status = WinningCondition_Onslaught(); // TODO remove this?
 -      }
        else
        {
                checkrules_status = WinningCondition_Scores(fraglimit, leadlimit);