]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
VERY evil debug feature: allow to set independent players by cvar
authorRudolf Polzer <divverent@xonotic.org>
Sun, 18 Sep 2011 11:20:00 +0000 (13:20 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 18 Sep 2011 11:20:43 +0000 (13:20 +0200)
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/defs.qh
qcsrc/server/scores_rules.qc

index 759a512e7974b87b91ccdc678dcaefbf4f409dd4..9430c6ff6aae65308f984bb117d83d3c70d6d1d7 100644 (file)
@@ -1995,6 +1995,9 @@ set _origin "0 0 0"
 set _campaign_index ""
 set _campaign_name ""
 
+// debug
+set _independent_players 0 "DO NOT TOUCH"
+
 // define some engine cvars that we need even on dedicated server
 set r_showbboxes 0
 
index e920b5c3415613f35f336b36d90ded55fb2233ad..7b7a3fcef0e66ff00f44a5e2828ead66486fcb69 100644 (file)
@@ -1,3 +1,4 @@
+float autocvar__independent_players;
 float autocvar__campaign_index;
 string autocvar__campaign_name;
 float autocvar__sv_init;
index 432fa7c503a517303d8af692235c1e335e4c5ecb..ef05663e5c58d5c2d4a01b2128acf036beb14642 100644 (file)
@@ -906,7 +906,7 @@ void PutClientInServer (void)
                if(clienttype(self) == CLIENTTYPE_BOT && autocvar_g_botclip_collisions)
                        self.dphitcontentsmask |= DPCONTENTS_BOTCLIP;
                self.frags = FRAGS_PLAYER;
-               if(independent_players)
+               if(INDEPENDENT_PLAYERS)
                        MAKE_INDEPENDENT_PLAYER(self);
                self.flags = FL_CLIENT;
                self.takedamage = DAMAGE_AIM;
index 7dd3a5aed03e8f478d52940a17c0ee8f18f62634..01966039c7e4a5d96742cb0a0ad0c8ab2770c620 100644 (file)
@@ -496,6 +496,7 @@ float GetPlayerSoundSampleField_notFound;
 .float version_mismatch;
 
 float independent_players;
+#define INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players)
 #define IS_INDEPENDENT_PLAYER(e) ((e).solid == SOLID_TRIGGER)
 #define MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER) + ((e).frags = FRAGS_PLAYER_NONSOLID))
 // we're using + here instead of , because fteqcc sucks
index 030a26d9cb8857f922fec1cc382ef14e81d6a29d..eb7205e9c3859bf5d3c2977d8bde069bd31993d7 100644 (file)
@@ -17,12 +17,12 @@ void ScoreRules_basics(float teams, float sprio, float stprio, float score_enabl
        if(score_enabled)
                ScoreInfo_SetLabel_TeamScore  (ST_SCORE,        "score",     stprio);
 
-       if not(independent_players)
+       if not(INDEPENDENT_PLAYERS)
                ScoreInfo_SetLabel_PlayerScore(SP_KILLS,        "kills",     0);
 
        ScoreInfo_SetLabel_PlayerScore(SP_DEATHS,       "deaths",    SFL_LOWER_IS_BETTER);
 
-       if not(independent_players)
+       if not(INDEPENDENT_PLAYERS)
                ScoreInfo_SetLabel_PlayerScore(SP_SUICIDES,     "suicides",  SFL_LOWER_IS_BETTER);
 
        if(score_enabled)