]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Player templates: More item pickups.
authorLyberta <lyberta@lyberta.net>
Thu, 5 Oct 2017 23:28:59 +0000 (02:28 +0300)
committerLyberta <lyberta@lyberta.net>
Thu, 5 Oct 2017 23:28:59 +0000 (02:28 +0300)
player-template-example.cfg
qcsrc/server/playertemplates.qc

index 679725581cc3366337f7793f55093b6376c342c4..77a2c4fa44df372d2900e8b88e5fb4a7ff4193c4 100644 (file)
@@ -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."
index 7528df13b814e9c170490b6006b69a69d52442ba..cdd06cb759cd7e631e27d66e6ea0dbc7e5597793 100644 (file)
@@ -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: ",