]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Random start weapons: Make g_random_start_weapons an autocvar.
authorLyberta <lyberta@lyberta.net>
Sat, 23 Sep 2017 06:46:03 +0000 (09:46 +0300)
committerLyberta <lyberta@lyberta.net>
Sat, 23 Sep 2017 06:46:03 +0000 (09:46 +0300)
qcsrc/server/client.qc
qcsrc/server/miscfunctions.qh

index d351dc35332bc55c0fcaa96d171ea4fb6400a52e..7754a16514c245abca724aef83e0b026c2eaa315 100644 (file)
@@ -559,7 +559,7 @@ void PutPlayerInServer(entity this)
                this.armorvalue = start_armorvalue;
                this.weapons = start_weapons;
                GiveRandomWeapons(this, random_start_weapons_count,
-                       cvar_string("g_random_start_weapons"), random_start_ammo);
+                       autocvar_g_random_start_weapons, random_start_ammo);
        }
        SetSpectatee_status(this, 0);
 
index 4544a5e0959f88cc22a85755e947a5d717f6e521..1dd3526dd48c435eaa00ade8bc1a0047b767079a 100644 (file)
@@ -190,6 +190,8 @@ float start_ammo_plasma;
 float start_ammo_fuel;
 /// \brief Number of random start weapons to give to players.
 int random_start_weapons_count;
+/// \brief Holds a list of possible random start weapons.
+string autocvar_g_random_start_weapons;
 /// \brief Entity that contains amount of ammo to give with random start
 /// weapons.
 entity random_start_ammo;