From 65c2b590ab8a2b8466ce7ba44e7ab17b6ab2c6e2 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Fri, 6 Oct 2017 02:28:59 +0300 Subject: [PATCH] Player templates: More item pickups. --- player-template-example.cfg | 2 ++ qcsrc/server/playertemplates.qc | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/player-template-example.cfg b/player-template-example.cfg index 679725581c..77a2c4fa44 100644 --- a/player-template-example.cfg +++ b/player-template-example.cfg @@ -73,6 +73,8 @@ set g_player_template_example_pickup_weapon_hlac "default" "What items does play set g_player_template_example_pickup_weapon_rifle "default" "What items does player get when they pickup a rifle." set g_player_template_example_pickup_weapon_seeker "default" "What items does player get when they pickup a TAG seeker." set g_player_template_example_pickup_weapon_vaporizer "default" "What items does player get when they pickup a vaporizer." +set g_player_template_example_pickup_weapon_hmg "default" "What items does player get when they pickup an HMG." +set g_player_template_example_pickup_weapon_rpc "default" "What items does player get when they pickup an RPC." set g_player_template_example_pickup_item_strength "default" "What items does player get when they pickup strength." set g_player_template_example_pickup_item_shield "default" "What items does player get when they pickup shield." set g_player_template_example_pickup_item_fuel_regen "default" "What items does player get when they pickup fuel regeneration." diff --git a/qcsrc/server/playertemplates.qc b/qcsrc/server/playertemplates.qc index 7528df13b8..cdd06cb759 100644 --- a/qcsrc/server/playertemplates.qc +++ b/qcsrc/server/playertemplates.qc @@ -629,6 +629,16 @@ float PlayerTemplateHook_ItemTouch(entity player, entity item, string template) return PlayerTemplate_GivePlayerItem(player, template, "pickup_weapon_vaporizer"); } + case "weapon_hmg": + { + return PlayerTemplate_GivePlayerItem(player, template, + "pickup_weapon_hmg"); + } + case "weapon_rpc": + { + return PlayerTemplate_GivePlayerItem(player, template, + "pickup_weapon_rpc"); + } case "droppedweapon": { switch (item.weapon) @@ -733,6 +743,16 @@ float PlayerTemplateHook_ItemTouch(entity player, entity item, string template) return PlayerTemplate_GivePlayerItem(player, template, "pickup_weapon_vaporizer"); } + case WEP_HMG.m_id: + { + return PlayerTemplate_GivePlayerItem(player, template, + "pickup_weapon_hmg"); + } + case WEP_RPC.m_id: + { + return PlayerTemplate_GivePlayerItem(player, template, + "pickup_weapon_rpc"); + } default: { PrintToChatAll(strcat("Unrecognized item, classname: ", -- 2.39.5