From 890a5d7b48c9c31343760df88288efc784fba5a4 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 3 Jun 2020 20:50:26 +1000 Subject: [PATCH] Rename the weapon swap cvar to g_weapon_noncore_allow and update its description to indicate that it map apply to other weapons in the future --- qcsrc/common/weapons/weapon/hlac.qc | 2 +- qcsrc/common/weapons/weapon/minelayer.qc | 2 +- qcsrc/common/weapons/weapon/rifle.qc | 2 +- qcsrc/common/weapons/weapon/seeker.qc | 2 +- qcsrc/server/autocvars.qh | 2 +- qcsrc/server/g_world.qc | 2 +- xonotic-server.cfg | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/qcsrc/common/weapons/weapon/hlac.qc b/qcsrc/common/weapons/weapon/hlac.qc index 508fa7e65..5e869228c 100644 --- a/qcsrc/common/weapons/weapon/hlac.qc +++ b/qcsrc/common/weapons/weapon/hlac.qc @@ -4,7 +4,7 @@ METHOD(HLAC, m_spawnfunc_hookreplace, Weapon(HLAC this, entity e)) { - if (autocvar_g_allow_noncore_weapons && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED)) + if (autocvar_g_weapon_noncore_allow && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED)) { return WEP_CRYLINK; } diff --git a/qcsrc/common/weapons/weapon/minelayer.qc b/qcsrc/common/weapons/weapon/minelayer.qc index 40ea2fb5c..a57252b2b 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qc +++ b/qcsrc/common/weapons/weapon/minelayer.qc @@ -4,7 +4,7 @@ METHOD(MineLayer, m_spawnfunc_hookreplace, Weapon(MineLayer this, entity e)) { - if (autocvar_g_allow_noncore_weapons && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED)) + if (autocvar_g_weapon_noncore_allow && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED)) { return WEP_MORTAR; } diff --git a/qcsrc/common/weapons/weapon/rifle.qc b/qcsrc/common/weapons/weapon/rifle.qc index ddf7990e5..7a06c6ce6 100644 --- a/qcsrc/common/weapons/weapon/rifle.qc +++ b/qcsrc/common/weapons/weapon/rifle.qc @@ -4,7 +4,7 @@ METHOD(Rifle, m_spawnfunc_hookreplace, Weapon(Rifle this, entity e)) { - if (autocvar_g_allow_noncore_weapons && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED)) + if (autocvar_g_weapon_noncore_allow && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED)) { return WEP_VORTEX; } diff --git a/qcsrc/common/weapons/weapon/seeker.qc b/qcsrc/common/weapons/weapon/seeker.qc index f8bb7a045..1150baf98 100644 --- a/qcsrc/common/weapons/weapon/seeker.qc +++ b/qcsrc/common/weapons/weapon/seeker.qc @@ -4,7 +4,7 @@ METHOD(Seeker, m_spawnfunc_hookreplace, Weapon(Seeker this, entity e)) { - if (autocvar_g_allow_noncore_weapons && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED)) + if (autocvar_g_weapon_noncore_allow && !Item_IsLoot(e) && (this.spawnflags & WEP_FLAG_MUTATORBLOCKED)) { return WEP_HAGAR; } diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 0f31b7b29..332c426e6 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -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_g_allow_noncore_weapons = true; +bool autocvar_g_weapon_noncore_allow = true; bool autocvar_sv_servermodelsonly; int autocvar_sv_spectate; float autocvar_sv_spectator_speed_multiplier; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index bb2cdc2f9..fbde65530 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -413,7 +413,7 @@ void cvar_changes_init() BADCVAR("capturelimit_override"); BADCVAR("fraglimit_override"); BADCVAR("gametype"); - BADCVAR("g_allow_noncore_weapons"); + BADCVAR("g_weapon_noncore_allow"); BADCVAR("g_antilag"); BADCVAR("g_balance_teams"); BADCVAR("g_balance_teams_prevent_imbalance"); diff --git a/xonotic-server.cfg b/xonotic-server.cfg index bb3852d0a..97880fafa 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -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 g_allow_noncore_weapons 1 "automatically replace legacy Nexuiz weapons with Xonotic counterparts, not applied when using the New Toys mutator" +set g_weapon_noncore_allow 1 "allow non-core weapons to spawn in the map" 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)" -- 2.39.2