From: Lyberta Date: Sat, 23 Sep 2017 06:46:03 +0000 (+0300) Subject: Random start weapons: Make g_random_start_weapons an autocvar. X-Git-Tag: xonotic-v0.8.5~2459^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=070545fd922f0598f372887e99acda7e13322511;p=xonotic%2Fxonotic-data.pk3dir.git Random start weapons: Make g_random_start_weapons an autocvar. --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index d351dc353..7754a1651 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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); diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 4544a5e09..1dd3526dd 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -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;