From: Rudolf Polzer Date: Thu, 15 Dec 2011 14:32:47 +0000 (+0100) Subject: get rid of g_powerup_*; add g_powerups X-Git-Tag: xonotic-v0.6.0~74^2~104 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=f07ed81c94eea941a9b00a82ad02742a4f8f23dd;p=xonotic%2Fxonotic-data.pk3dir.git get rid of g_powerup_*; add g_powerups --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 1044e8abf..af797c1e9 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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" diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c index e91611321..7cdbdb8d0 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c @@ -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 diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 8f45f5367..ae832d817 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -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; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 3d393755a..f81a245de 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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"); diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 7df226be7..dc8ab56c9 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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"); diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index f7a8d2aec..eb6331a88 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -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) diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 204bd6cd1..5df502525 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -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;