]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/race/sv_race.qc
Add a wrapper for networked cvars and attach them to the client rather than the clien...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / race / sv_race.qc
index 66b23f6a6879160d00933705e17624553f5a2310..a69a435227785f7172f65558155049abaddbbc4e 100644 (file)
@@ -1,6 +1,12 @@
 #include "sv_race.qh"
 
+#include <server/client.qh>
+#include <server/world.qh>
+#include <server/gamelog.qh>
+#include <server/intermission.qh>
 #include <server/race.qh>
+#include <common/ent_cs.qh>
+#include <common/mapobjects/triggers.qh>
 
 #define autocvar_g_race_laps_limit cvar("g_race_laps_limit")
 float autocvar_g_race_qualifying_timelimit;
@@ -202,7 +208,7 @@ MUTATOR_HOOKFUNCTION(rc, reset_map_global)
        Score_NicePrint(NULL);
 
        race_ClearRecords();
-       PlayerScore_Sort(race_place, 0, 1, 0);
+       PlayerScore_Sort(race_place, 0, true, false);
 
        FOREACH_CLIENT(true, {
                if(it.race_place)
@@ -261,7 +267,7 @@ MUTATOR_HOOKFUNCTION(rc, MakePlayerObserver)
        if(g_race_qualifying)
        {
                if(GameRules_scoring_add(player, RACE_FASTEST, 0))
-                       player.frags = FRAGS_LMS_LOSER;
+                       player.frags = FRAGS_PLAYER_OUT_OF_GAME;
                else
                        player.frags = FRAGS_SPECTATOR;
        }
@@ -322,7 +328,7 @@ MUTATOR_HOOKFUNCTION(rc, GetPressedKeys)
 {
        entity player = M_ARGV(0, entity);
 
-       if(CS(player).cvar_cl_allow_uidtracking == 1 && CS(player).cvar_cl_allow_uid2name == 1)
+       if(CS_CVAR(player).cvar_cl_allow_uidtracking == 1 && CS_CVAR(player).cvar_cl_allow_uid2name == 1)
        {
                if (!player.stored_netname)
                        player.stored_netname = strzone(uid2name(player.crypto_idfp));
@@ -444,6 +450,7 @@ void race_Initialize()
        race_ScoreRules();
        if(g_race_qualifying == 2)
                warmup_stage = 0;
+       radar_showenemies = true;
 }
 
 void rc_SetLimits()