]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into Mario/domination_mutator
authorSamual Lenks <samual@xonotic.org>
Mon, 4 Feb 2013 21:49:01 +0000 (16:49 -0500)
committerSamual Lenks <samual@xonotic.org>
Mon, 4 Feb 2013 21:49:01 +0000 (16:49 -0500)
1  2 
qcsrc/server/cl_client.qc
qcsrc/server/scores_rules.qc

index 0144fbf326b305c54dde97fc3593beea9ed56629,691f8621c6f8b35b14c5f80b0057a248fb720aff..a6bc87f9f6af76752d7e104625483f88b365c584
@@@ -407,10 -407,11 +407,11 @@@ void PutObserverInServer (void
        minstagib_stop_countdown(self);
  
        Portal_ClearAll(self);
+       
        if(self.alivetime)
        {
-               PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime);
+               if(!inWarmupStage)
+                       PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime);
                self.alivetime = 0;
        }
  
        {
                if(self.version_mismatch)
                {
+                       self.frags = FRAGS_SPECTATOR;
                        Spawnqueue_Unmark(self);
                        Spawnqueue_Remove(self);
                }
                else
                {
+                       self.frags = FRAGS_LMS_LOSER;
                        Spawnqueue_Insert(self);
                }
        }
                else
                        self.frags = FRAGS_SPECTATOR;
        }
+       else if((g_race && g_race_qualifying) || g_cts)
+       {
+               if(PlayerScore_Add(self, SP_RACE_FASTEST, 0))
+                       self.frags = FRAGS_LMS_LOSER;
+               else
+                       self.frags = FRAGS_SPECTATOR;
+       }
        else
                self.frags = FRAGS_SPECTATOR;
  }
@@@ -913,8 -923,9 +923,9 @@@ void PutClientInServer (void
                self.weaponname = "";
                self.switchingweapon = 0;
  
-               if(!self.alivetime)
-                       self.alivetime = time;
+               if(!inWarmupStage)
+                       if(!self.alivetime)
+                               self.alivetime = time;
  
                antilag_clear(self);
  
@@@ -1381,6 -1392,9 +1392,6 @@@ void ClientConnect (void
  
        race_PreSpawnObserver();
  
 -      //if(g_domination)
 -      //      dom_player_join_team(self);
 -
        // identify the right forced team
        if(autocvar_g_campaign)
        {
        else if(autocvar_sv_teamnagger && !(autocvar_bot_vs_human && (c3==-1 && c4==-1)) && !g_ca) // teamnagger is currently bad for ca
                send_CSQC_teamnagger();
  
 -      if (g_domination)
 -              set_dom_state(self);
 -
        CheatInitClient();
  
        if(!autocvar_g_campaign)
index ebf1336888ac595f682b6acc0d4beed28156bc78,b7947f0fa8e06755b511465aea2471be7566d3fb..13fd49f29bf58e72a57ca3514b2f19103fc0d0bf
@@@ -44,6 -44,26 +44,6 @@@ void ScoreRules_generic(
        ScoreRules_basics_end();
  }
  
 -// g_domination
 -#define ST_DOM_TICKS 1
 -#define SP_DOM_TICKS 4
 -#define SP_DOM_TAKES 5
 -void ScoreRules_dom()
 -{
 -      float sp_domticks, sp_score;
 -      sp_score = sp_domticks = 0;
 -      if(autocvar_g_domination_disable_frags)
 -              sp_domticks = SFL_SORT_PRIO_PRIMARY;
 -      else
 -              sp_score = SFL_SORT_PRIO_PRIMARY;
 -      CheckAllowedTeams(world);
 -      ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), sp_score, sp_score, TRUE);
 -      ScoreInfo_SetLabel_TeamScore  (ST_DOM_TICKS,    "ticks",     sp_domticks);
 -      ScoreInfo_SetLabel_PlayerScore(SP_DOM_TICKS,    "ticks",     sp_domticks);
 -      ScoreInfo_SetLabel_PlayerScore(SP_DOM_TAKES,    "takes",     0);
 -      ScoreRules_basics_end();
 -}
 -
  // LMS stuff
  #define SP_LMS_LIVES 4
  #define SP_LMS_RANK 5
@@@ -79,9 -99,8 +79,8 @@@ void ScoreRules_kh(float teams
  // Race stuff
  #define ST_RACE_LAPS 1
  #define SP_RACE_LAPS 4
- #define SP_RACE_FASTEST 5
  #define SP_RACE_TIME 5
//#define SP_RACE_RANK 6
#define SP_RACE_FASTEST 6
  void ScoreRules_race()
  {
        ScoreRules_basics(race_teams, 0, 0, FALSE);
                ScoreInfo_SetLabel_TeamScore(  ST_RACE_LAPS,    "laps",      SFL_SORT_PRIO_PRIMARY);
                ScoreInfo_SetLabel_PlayerScore(SP_RACE_LAPS,    "laps",      SFL_SORT_PRIO_PRIMARY);
                ScoreInfo_SetLabel_PlayerScore(SP_RACE_TIME,    "time",      SFL_SORT_PRIO_SECONDARY | SFL_LOWER_IS_BETTER | SFL_TIME);
-               //ScoreInfo_SetLabel_PlayerScore(SP_RACE_RANK,    "rank",      SFL_LOWER_IS_BETTER | SFL_RANK | SFL_ALLOW_HIDE);
+               ScoreInfo_SetLabel_PlayerScore(SP_RACE_FASTEST, "fastest",   SFL_LOWER_IS_BETTER | SFL_TIME);
        }
        else if(g_race_qualifying)
        {
        }
        else
        {
-               //ScoreInfo_SetLabel_TeamScore(  ST_RACE_LAPS,    "laps",      0);
                ScoreInfo_SetLabel_PlayerScore(SP_RACE_LAPS,    "laps",      SFL_SORT_PRIO_PRIMARY);
                ScoreInfo_SetLabel_PlayerScore(SP_RACE_TIME,    "time",      SFL_SORT_PRIO_SECONDARY | SFL_LOWER_IS_BETTER | SFL_TIME);
+               ScoreInfo_SetLabel_PlayerScore(SP_RACE_FASTEST, "fastest",   SFL_LOWER_IS_BETTER | SFL_TIME);
        }
        ScoreRules_basics_end();
  }