]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rename the weapon swap cvar to g_allow_noncore_weapons for future proofing
authorMario <mario.mario@y7mail.com>
Wed, 3 Jun 2020 10:37:58 +0000 (20:37 +1000)
committerMario <mario.mario@y7mail.com>
Wed, 3 Jun 2020 10:37:58 +0000 (20:37 +1000)
qcsrc/common/weapons/weapon/hlac.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/rifle.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/server/autocvars.qh
qcsrc/server/g_world.qc
xonotic-server.cfg

index 950612f9f36999c3a8a50bdb50184252f8194fe7..508fa7e6512a0b1b5d7d6c282fa80658366fd922 100644 (file)
@@ -4,7 +4,7 @@
 
 METHOD(HLAC, m_spawnfunc_hookreplace, Weapon(HLAC this, entity e))
 {
-    if (autocvar_sv_nexuizcompat_weaponswap && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED))
+    if (autocvar_g_allow_noncore_weapons && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED))
     {
         return WEP_CRYLINK;
     }
index ac3a57a92f1ac90a19bf0cadf75be5956bb0a4a3..40ea2fb5c0a81ff3c38c523301f68ad32d5eb9ce 100644 (file)
@@ -4,7 +4,7 @@
 
 METHOD(MineLayer, m_spawnfunc_hookreplace, Weapon(MineLayer this, entity e))
 {
-    if (autocvar_sv_nexuizcompat_weaponswap && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED))
+    if (autocvar_g_allow_noncore_weapons && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED))
     {
         return WEP_MORTAR;
     }
index 6de0cca91877e3face5d93f6d68990456a129578..ddf7990e56878366544bbd180e54a71f82bad6cd 100644 (file)
@@ -4,7 +4,7 @@
 
 METHOD(Rifle, m_spawnfunc_hookreplace, Weapon(Rifle this, entity e))
 {
-    if (autocvar_sv_nexuizcompat_weaponswap && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED))
+    if (autocvar_g_allow_noncore_weapons && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED))
     {
         return WEP_VORTEX;
     }
index 7b6b3e3e2a01683f15c2b6236bc332be417adbb3..f8bb7a0459f3eb19ebf9ee197ff5b26a597580b3 100644 (file)
@@ -4,7 +4,7 @@
 
 METHOD(Seeker, m_spawnfunc_hookreplace, Weapon(Seeker this, entity e))
 {
-    if (autocvar_sv_nexuizcompat_weaponswap && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED))
+    if (autocvar_g_allow_noncore_weapons && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED))
     {
         return WEP_HAGAR;
     }
index de0609ccf8c01091304afee5e2d6a3f5c57a1805..0f31b7b2979a43342312cdea2f619fb963a21950 100644 (file)
@@ -328,7 +328,7 @@ string autocvar_sv_motd;
 int autocvar_sv_name_maxlength = 64;
 bool autocvar_sv_precacheplayermodels;
 bool autocvar_sv_q3acompat_machineshotgunswap;
-bool autocvar_sv_nexuizcompat_weaponswap = true;
+bool autocvar_g_allow_noncore_weapons = true;
 bool autocvar_sv_servermodelsonly;
 int autocvar_sv_spectate;
 float autocvar_sv_spectator_speed_multiplier;
index a83aac7a9e075be038991ed6385d726b3f0632bd..bb2cdc2f9ce56e7f388352716fcff20d9bef10bd 100644 (file)
@@ -413,6 +413,7 @@ void cvar_changes_init()
                BADCVAR("capturelimit_override");
                BADCVAR("fraglimit_override");
                BADCVAR("gametype");
+               BADCVAR("g_allow_noncore_weapons");
                BADCVAR("g_antilag");
                BADCVAR("g_balance_teams");
                BADCVAR("g_balance_teams_prevent_imbalance");
@@ -484,7 +485,6 @@ void cvar_changes_init()
                BADCVAR("sv_vote_master_commands");
                BADCVAR("sv_vote_master_password");
                BADCVAR("sv_vote_simple_majority_factor");
-               BADCVAR("sv_nexuizcompat_weaponswap");
                BADCVAR("teamplay_mode");
                BADCVAR("timelimit_override");
                BADPREFIX("g_warmup_");
index fb1d89a402afa572bcb8bdd75e998a003f01adfa..bb3852d0a00bf3cea1396756758ff69aac630c3e 100644 (file)
@@ -496,7 +496,7 @@ sv_gameplayfix_nogravityonground 1
 
 set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping machinegun and shotgun (for Q3A map compatibility in mapinfo files)"
 set sv_q3defragcompat 0 "toggle for some compatibility hacks (for Q3DF map compatibility)"
-set sv_nexuizcompat_weaponswap 1 "automatically replace legacy Nexuiz weapons with Xonotic counterparts, not applied when using the New Toys mutator"
+set g_allow_noncore_weapons 1 "automatically replace legacy Nexuiz weapons with Xonotic counterparts, not applied when using the New Toys mutator"
 
 set g_movement_highspeed 1 "multiplier scale for movement speed (applies to sv_maxspeed and sv_maxairspeed, also applies to air acceleration when g_movement_highspeed_q3_compat is set to 0)"
 set g_movement_highspeed_q3_compat 0 "apply speed modifiers to air movement in a more Q3-compatible way (only apply speed buffs and g_movement_highspeed to max air speed, not to acceleration)"