From: LegendaryGuard Date: Wed, 26 May 2021 20:15:31 +0000 (+0200) Subject: Added cvar to include special random weapons and disabled by default X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ed15902307b9616900910e4cc966a62e94336947;p=xonotic%2Fxonotic-data.pk3dir.git Added cvar to include special random weapons and disabled by default --- diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 19579ab8e..95b49ec1d 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -749,12 +749,10 @@ void nade_emerald_SpawnWeapon(entity ent, vector org, entity wep) //LegendGuard adds random weapon item spawn function for emerald nade 25-05-2021 void nade_emerald_randomweapons(entity e, vector org) { - bool randomweapons_includespecial = true; - if (random() > 0.5) { RandomSelection_Init(); - FOREACH(Weapons, it != WEP_Null && (!((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)) || randomweapons_includespecial), + FOREACH(Weapons, it != WEP_Null && (!((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)) || autocvar_g_nades_emerald_randomweapons_includespecial), { if((it.spawnflags & WEP_FLAG_HIDDEN) && (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)) continue; diff --git a/qcsrc/common/mutators/mutator/nades/nades.qh b/qcsrc/common/mutators/mutator/nades/nades.qh index b9f971f9e..f0f70da24 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qh +++ b/qcsrc/common/mutators/mutator/nades/nades.qh @@ -65,6 +65,7 @@ float autocvar_g_nades_entrap_time = 10; float autocvar_g_nades_veil_time = 8; float autocvar_g_nades_veil_radius = 300; float autocvar_g_nades_emerald_lifetime = 5; //LegendGuard adds new nade cvars 28-02-2021 +bool autocvar_g_nades_emerald_randomweapons_includespecial = false; float autocvar_g_nades_emerald_spawncount = 1; float autocvar_g_nades_emerald_ball_spread = 0.5; float autocvar_g_nades_emerald_ball_lifetime = 1; //if much time, many items will spawn