From ed1eafd3d9ec7a13a7c7bcf68a6a4ae6c88974b6 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Wed, 16 Aug 2017 05:44:01 +0300 Subject: [PATCH] Player templates: Use new random weapon cvars. --- player-template-example.cfg | 4 ++++ .../mutator/playertemplates/sv_playertemplates.qc | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/player-template-example.cfg b/player-template-example.cfg index ceba1597a3..f418b32f32 100644 --- a/player-template-example.cfg +++ b/player-template-example.cfg @@ -20,6 +20,10 @@ set g_player_template_example_start_weapons "default" "Which weapons does player // random weapons. The code will make sure that they are not duplicate. set g_player_template_example_num_random_start_weapons 0 "Number of weapons that can be randomly given to player during spawn" set g_player_template_example_random_start_weapons "" "Weapons that can be randomly given to player during spawn" +set g_player_template_example_random_start_shells "default" "How much shells does the player get with random start shell-based weapon" +set g_player_template_example_random_start_bullets "default" "How much bullets does the player get with random start bullet-based weapon" +set g_player_template_example_random_start_rockets "default" "How much rockets does the player get with random start rocket-based weapon" +set g_player_template_example_random_start_cells "default" "How much cells does the player get with random start cell-based weapon" // Item pickup section // Variables in this section define what happens during item pickup. diff --git a/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc b/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc index 92cdc25378..1ad8dea6cb 100644 --- a/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc +++ b/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc @@ -49,23 +49,23 @@ string PlayerTemplate_GetDefaultCvarName(string variable) } case "random_start_shells": { - return "g_pickup_shells_weapon"; + return "g_random_start_shells"; } case "random_start_bullets": { - return "g_pickup_nails_weapon"; + return "g_random_start_bullets"; } case "random_start_rockets": { - return "g_pickup_rockets_weapon"; + return "g_random_start_rockets"; } case "random_start_cells": { - return "g_pickup_cells_weapon"; + return "g_random_start_cells"; } case "random_start_plasma": { - return "g_pickup_plasma_weapon"; + return "g_random_start_plasma"; } case "health_regen_factor": { -- 2.39.5