]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
get rid of g_powerup_*; add g_powerups
authorRudolf Polzer <divverent@alientrap.org>
Thu, 15 Dec 2011 14:32:47 +0000 (15:32 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 15 Dec 2011 14:33:18 +0000 (15:33 +0100)
defaultXonotic.cfg
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/g_world.qc
qcsrc/server/t_items.qc
qcsrc/server/teamplay.qc

index 1044e8abfa4a745a370c2345346b28320251b1c1..af797c1e943502e7fbc9ba30c4f7db98da6e9dc8 100644 (file)
@@ -500,10 +500,7 @@ set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved t
 set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed"
 set g_weapon_stay 0 "if set to 1 or 2, weapons stay after they were picked up (1: weapons you don't have yet give you ammo of their type and they can not be dropped, 2: weapons don't give ammo, but instead players start with one pickup-load of ammo by default, 3: weapons give ammo, weapons only stay as ammo-less ghosts)"
 set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
-set g_powerup_superhealth 1 "if set to 0 the mega health powerup will not spawn on the map"
-set g_powerup_strength 1 "if set to 0 the strength powerup will not spawn on the map"
-set g_powerup_shield 1 "if set to 0 the shield (invincibility) powerup will not spawn on the map"
-set g_balance_powerup_timer 1 "if set to 0 the powerups dont wear off"
+set g_powerups 1 "if set to 0 the strength and shield (invincibility) will not spawn on the map"
 set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammunition"
 set g_pickup_items 1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map"
 set g_minstagib 0      "enable minstagib"
index e91611321642e83d5873e6bf42699581abc0b008..7cdbdb8d02d8438c22232de5d3ad68db122bbd80 100644 (file)
@@ -96,12 +96,8 @@ string XonoticMutatorsDialog_toString(entity me)
                s = strcat(s, ", ", _("Blood loss"));
        if(cvar("g_jetpack"))
                s = strcat(s, ", ", _("Jet pack"));
-       if(!cvar("g_powerup_superhealth"))
-               s = strcat(s, ", ", _("No superhealth"));
-       if(!cvar("g_powerup_strength"))
-               s = strcat(s, ", ", _("No strength"));
-       if(!cvar("g_powerup_shield"))
-               s = strcat(s, ", ", _("No shield"));
+       if(!cvar("g_powerups"))
+               s = strcat(s, ", ", _("No powerups"));
        if(s == "")
                return ZCTX(_("MUT^None"));
        else
index 8f45f5367e2ae88756d0fef15a65ea961cb5ab87..ae832d81703b85c1efe8134bf69fcaf512a14a20 100644 (file)
@@ -566,7 +566,6 @@ float autocvar_g_balance_powerup_strength_force;
 float autocvar_g_balance_powerup_strength_selfdamage;
 float autocvar_g_balance_powerup_strength_selfforce;
 float autocvar_g_balance_powerup_strength_time;
-float autocvar_g_balance_powerup_timer;
 float autocvar_g_balance_rocketlauncher_ammo;
 float autocvar_g_balance_rocketlauncher_animtime;
 float autocvar_g_balance_rocketlauncher_damage;
@@ -925,9 +924,7 @@ float autocvar_g_player_alpha;
 float autocvar_g_player_brightness;
 float autocvar_g_playerclip_collisions;
 string autocvar_g_playerstats_uri;
-float autocvar_g_powerup_shield;
-float autocvar_g_powerup_strength;
-float autocvar_g_powerup_superhealth;
+float autocvar_g_powerups;
 float autocvar_g_projectiles_damage;
 float autocvar_g_projectiles_newton_style;
 float autocvar_g_projectiles_newton_style_2_maxfactor;
index 3d393755a0f3749d33793dc7b6de1e574c1284c2..f81a245deee43527157940b2562645b6a7d2a822 100644 (file)
@@ -1976,7 +1976,7 @@ void player_powerups (void)
                if (self.items & IT_INVINCIBLE)
                {
                        play_countdown(self.invincible_finished, "misc/poweroff.wav");
-                       if (time > self.invincible_finished && autocvar_g_balance_powerup_timer)
+                       if (time > self.invincible_finished)
                        {
                                self.items = self.items - (self.items & IT_INVINCIBLE);
                                sprint(self, "^3Speed has worn off\n");
@@ -1997,7 +1997,7 @@ void player_powerups (void)
                {
                        play_countdown(self.strength_finished, "misc/poweroff.wav");
                        self.effects = self.effects | (EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT);
-                       if (time > self.strength_finished && autocvar_g_balance_powerup_timer)
+                       if (time > self.strength_finished)
                        {
                                self.items = self.items - (self.items & IT_STRENGTH);
                                sprint(self, "^3Strength has worn off\n");
@@ -2015,7 +2015,7 @@ void player_powerups (void)
                {
                        play_countdown(self.invincible_finished, "misc/poweroff.wav");
                        self.effects = self.effects | (EF_RED | EF_ADDITIVE | EF_FULLBRIGHT);
-                       if (time > self.invincible_finished && autocvar_g_balance_powerup_timer)
+                       if (time > self.invincible_finished)
                        {
                                self.items = self.items - (self.items & IT_INVINCIBLE);
                                sprint(self, "^3Shield has worn off\n");
index 7df226be7c364bf21eea345986501165f4d3a63a..dc8ab56c93aab25ec7639df389fbe43c5ca7b9a2 100644 (file)
@@ -444,6 +444,7 @@ void cvar_changes_init()
                BADCVAR("g_minstagib");
                BADCVAR("g_mirrordamage");
                BADCVAR("g_nexball_goallimit");
+               BADCVAR("g_powerups");
                BADCVAR("g_runematch_point_limit");
                BADCVAR("g_start_delay");
                BADCVAR("g_warmup");
@@ -483,7 +484,6 @@ void cvar_changes_init()
                BADCVAR("sys_ticrate");
                BADCVAR("teamplay_mode");
                BADCVAR("timelimit_override");
-               BADPREFIX("g_powerup_");
                BADPREFIX("g_warmup_");
                BADPREFIX("sv_ready_restart_");
 
@@ -767,16 +767,8 @@ void spawnfunc_worldspawn (void)
                        s = strcat(s, ":minstagib");
 
                // TODO to mutator system
-               if(!autocvar_g_powerup_superhealth)
-                       s = strcat(s, ":no_superhealth");
-
-               // TODO to mutator system
-               if(!autocvar_g_powerup_strength)
-                       s = strcat(s, ":no_strength");
-
-               // TODO to mutator system
-               if(!autocvar_g_powerup_shield)
-                       s = strcat(s, ":no_shield");
+               if(!autocvar_g_powerups)
+                       s = strcat(s, ":no_powerups");
 
                GameLogEcho(s);
                GameLogEcho(":gameinfo:end");
index f7a8d2aec157a966e0299a89402e2b280af92721..eb6331a88923985a3be535af256dfb8939fb7eb9 100644 (file)
@@ -1220,12 +1220,6 @@ void spawnfunc_item_health_large (void) {
 }
 
 void spawnfunc_item_health_mega (void) {
-       if(!autocvar_g_powerup_superhealth)
-               return;
-
-       if((g_arena || g_ca) && !autocvar_g_arena_powerups)
-               return;
-
        if(g_minstagib) {
                minstagib_items(IT_NAILS);
        } else {
@@ -1247,7 +1241,7 @@ void spawnfunc_item_health25() { spawnfunc_item_health_medium(); }
 void spawnfunc_item_health100() { spawnfunc_item_health_mega(); }
 
 void spawnfunc_item_strength (void) {
-       if(!autocvar_g_powerup_strength)
+       if(!autocvar_g_powerups)
                return;
 
        if((g_arena || g_ca) && !autocvar_g_arena_powerups)
@@ -1263,7 +1257,7 @@ void spawnfunc_item_strength (void) {
 }
 
 void spawnfunc_item_invincible (void) {
-       if(!autocvar_g_powerup_shield)
+       if(!autocvar_g_powerups)
                return;
 
        if((g_arena || g_ca) && !autocvar_g_arena_powerups)
index 204bd6cd1d823a80eee6ec7c57d12ed7a79ceda3..5df5025251db77da36b8d4ad4590e1c84f81ef6b 100644 (file)
@@ -478,12 +478,8 @@ string getwelcomemessage(void)
                modifications = strcat(modifications, ", Blood loss");
        if(g_jetpack)
                modifications = strcat(modifications, ", Jet pack");
-       if(!autocvar_g_powerup_superhealth)
-               modifications = strcat(modifications, ", No superhealth");
-       if(!autocvar_g_powerup_strength)
-               modifications = strcat(modifications, ", No strength");
-       if(!autocvar_g_powerup_shield)
-               modifications = strcat(modifications, ", No shield");
+       if(!autocvar_g_powerups)
+               modifications = strcat(modifications, ", No powerups");
        modifications = substring(modifications, 2, strlen(modifications) - 2);
 
        string versionmessage;