From 9326e11368192bc8a4738909fcf0472b91b047ef Mon Sep 17 00:00:00 2001 From: Lyberta Date: Fri, 18 Aug 2017 11:53:01 +0300 Subject: [PATCH] Renamed num_random_start_weapons to random_start_weapons_count. --- balance-mario.cfg | 2 +- balance-nexuiz25.cfg | 2 +- balance-overkill.cfg | 2 +- balance-samual.cfg | 2 +- balance-xdf.cfg | 2 +- balance-xonotic.cfg | 2 +- balance-xpm.cfg | 2 +- qcsrc/server/client.qc | 2 +- qcsrc/server/miscfunctions.qc | 2 +- qcsrc/server/miscfunctions.qh | 8 +++++++- 10 files changed, 16 insertions(+), 10 deletions(-) diff --git a/balance-mario.cfg b/balance-mario.cfg index eabbff577..79617880b 100644 --- a/balance-mario.cfg +++ b/balance-mario.cfg @@ -9,7 +9,7 @@ set g_start_ammo_rockets 0 set g_start_ammo_cells 0 set g_start_ammo_plasma 0 set g_start_ammo_fuel 0 -set g_num_random_start_weapons 0 +set g_random_start_weapons_count 0 set g_random_start_weapons "machinegun mortar electro crylink vortex hagar devastator" set g_random_start_shells 15 set g_random_start_bullets 80 diff --git a/balance-nexuiz25.cfg b/balance-nexuiz25.cfg index b31df84a6..37099c122 100644 --- a/balance-nexuiz25.cfg +++ b/balance-nexuiz25.cfg @@ -9,7 +9,7 @@ set g_start_ammo_rockets 0 set g_start_ammo_cells 0 set g_start_ammo_plasma 0 set g_start_ammo_fuel 0 -set g_num_random_start_weapons 0 +set g_random_start_weapons_count 0 set g_random_start_weapons "machinegun mortar electro crylink vortex hagar devastator" set g_random_start_shells 15 set g_random_start_bullets 80 diff --git a/balance-overkill.cfg b/balance-overkill.cfg index eb9fe4fd4..e64a19e5f 100644 --- a/balance-overkill.cfg +++ b/balance-overkill.cfg @@ -9,7 +9,7 @@ set g_start_ammo_rockets 0 set g_start_ammo_cells 0 set g_start_ammo_plasma 0 set g_start_ammo_fuel 0 -set g_num_random_start_weapons 0 +set g_random_start_weapons_count 0 set g_random_start_weapons "machinegun mortar electro crylink vortex hagar devastator" set g_random_start_shells 15 set g_random_start_bullets 80 diff --git a/balance-samual.cfg b/balance-samual.cfg index f1d81cab1..4b579f0fd 100644 --- a/balance-samual.cfg +++ b/balance-samual.cfg @@ -9,7 +9,7 @@ set g_start_ammo_rockets 0 set g_start_ammo_cells 0 set g_start_ammo_plasma 0 set g_start_ammo_fuel 0 -set g_num_random_start_weapons 0 +set g_random_start_weapons_count 0 set g_random_start_weapons "machinegun mortar electro crylink vortex hagar devastator" set g_random_start_shells 15 set g_random_start_bullets 80 diff --git a/balance-xdf.cfg b/balance-xdf.cfg index 87643b8b2..66a92403d 100644 --- a/balance-xdf.cfg +++ b/balance-xdf.cfg @@ -9,7 +9,7 @@ set g_start_ammo_rockets 0 set g_start_ammo_cells 0 set g_start_ammo_plasma 0 set g_start_ammo_fuel 0 -set g_num_random_start_weapons 0 +set g_random_start_weapons_count 0 set g_random_start_weapons "machinegun mortar electro crylink vortex hagar devastator" set g_random_start_shells 15 set g_random_start_bullets 80 diff --git a/balance-xonotic.cfg b/balance-xonotic.cfg index 02b928c90..a1fd084e6 100644 --- a/balance-xonotic.cfg +++ b/balance-xonotic.cfg @@ -9,7 +9,7 @@ set g_start_ammo_rockets 0 set g_start_ammo_cells 0 set g_start_ammo_plasma 0 set g_start_ammo_fuel 0 -set g_num_random_start_weapons 0 +set g_random_start_weapons_count 0 set g_random_start_weapons "machinegun mortar electro crylink vortex hagar devastator" set g_random_start_shells 15 set g_random_start_bullets 80 diff --git a/balance-xpm.cfg b/balance-xpm.cfg index 9731f7ee0..4b3cfb91d 100644 --- a/balance-xpm.cfg +++ b/balance-xpm.cfg @@ -9,7 +9,7 @@ set g_start_ammo_rockets 0 set g_start_ammo_cells 0 set g_start_ammo_plasma 0 set g_start_ammo_fuel 0 -set g_num_random_start_weapons 0 +set g_random_start_weapons_count 0 set g_random_start_weapons "machinegun mortar electro crylink vortex hagar devastator" set g_random_start_shells 15 set g_random_start_bullets 80 diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 43fd0be91..5cc8349ac 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -546,7 +546,7 @@ void PutPlayerInServer(entity this) this.health = start_health; this.armorvalue = start_armorvalue; this.weapons = start_weapons; - GivePlayerRandomWeapons(this, num_random_start_weapons, + GivePlayerRandomWeapons(this, random_start_weapons_count, cvar_string("g_random_start_weapons"), random_start_shells, random_start_bullets, random_start_rockets, random_start_cells, random_start_plasma); diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 1abcf850c..62be9cbbe 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -643,7 +643,7 @@ void readplayerstartcvars() start_ammo_cells = cvar("g_start_ammo_cells"); start_ammo_plasma = cvar("g_start_ammo_plasma"); start_ammo_fuel = cvar("g_start_ammo_fuel"); - num_random_start_weapons = cvar("g_num_random_start_weapons"); + random_start_weapons_count = cvar("g_random_start_weapons_count"); random_start_shells = cvar("g_random_start_shells"); random_start_bullets = cvar("g_random_start_bullets"); random_start_rockets = cvar("g_random_start_rockets"); diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 23a5778e0..8dc3faa18 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -188,11 +188,17 @@ float start_ammo_rockets; float start_ammo_cells; float start_ammo_plasma; float start_ammo_fuel; -int num_random_start_weapons; +/// \brief Number of random start weapons to give to players. +int random_start_weapons_count; +/// \brief Amount of shells to give with a shell-based random start weapon. float random_start_shells; +/// \brief Amount of bullets to give with a bullet-based random start weapon. float random_start_bullets; +/// \brief Amount of rockets to give with a rocket-based random start weapon. float random_start_rockets; +/// \brief Amount of cells to give with a cell-based random start weapon. float random_start_cells; +/// \brief Amount of plasma to give with a plasma-based random start weapon. float random_start_plasma; float start_health; float start_armorvalue; -- 2.39.2