]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Player templates: updated to handle more items.
authorLyberta <lyberta@lyberta.net>
Thu, 5 Oct 2017 14:04:07 +0000 (17:04 +0300)
committerLyberta <lyberta@lyberta.net>
Thu, 5 Oct 2017 14:04:07 +0000 (17:04 +0300)
player-template-example.cfg
qcsrc/server/playertemplates.qc

index 408f18d69548340c19bf2602f72458c50b5153d5..134c7f993c2c723974cb365275446b19e62794fc 100644 (file)
@@ -5,27 +5,30 @@
 
 // Spawn section
 // Variables in this section define what happens during spawn.
-set g_player_template_example_start_health "default" "How much health does player get during spawn"
-set g_player_template_example_start_armor "default" "How much armor does player get during spawn"
-set g_player_template_example_unlimited_ammo "default" "Whether to give player unlimited ammo"
-set g_player_template_example_start_ammo_shells "default" "How much shells does player get during spawn"
-set g_player_template_example_start_ammo_bullets "default" "How much bullets does player get during spawn"
-set g_player_template_example_start_ammo_rockets "default" "How much rockets does player get during spawn"
-set g_player_template_example_start_ammo_cells "default" "How much cells does player get during spawn"
+set g_player_template_example_start_health "default" "How much health does the player get during spawn."
+set g_player_template_example_start_armor "default" "How much armor does the player get during spawn."
+set g_player_template_example_unlimited_ammo "default" "Whether to give player unlimited ammo."
+set g_player_template_example_start_ammo_shells "default" "How much shells does the player get during spawn."
+set g_player_template_example_start_ammo_bullets "default" "How much bullets does the player get during spawn."
+set g_player_template_example_start_ammo_rockets "default" "How much rockets does the player get during spawn."
+set g_player_template_example_start_ammo_cells "default" "How much cells does the player get during spawn."
+set g_player_template_example_start_ammo_plasma "default" "How much plasma does the player get during spawn."
+set g_player_template_example_start_ammo_fuel "default" "How much fuel does the player get during spawn."
 // These weapons are given to all players by default. They are usually blaster and shotgun.
-set g_player_template_example_default_start_weapons "default" "Whether to give player default start weapons"
+set g_player_template_example_default_start_weapons "default" "Whether to give player default start weapons."
 // These weapons will be given unconditionally.
-set g_player_template_example_start_weapons "default" "Which weapons does player get during spawn"
+set g_player_template_example_start_weapons "default" "Which weapons does player get during spawn."
 // These weapons will be given randomly. The player will get the exact amount of
 // random weapons. The code will make sure that they are not duplicate.
-set g_player_template_example_random_start_weapons_count "default" "Number of weapons that can be randomly given to player during spawn"
-set g_player_template_example_random_start_weapons "default" "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"
+set g_player_template_example_random_start_weapons_count "default" "Number of weapons that can be randomly given to player during spawn."
+set g_player_template_example_random_start_weapons "default" "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."
+set g_player_template_example_random_start_plasma "default" "How much plasma does the player get with random start cell-based weapon."
 
-set g_player_template_example_drop_weapons "default" "Whether the player can drop weapons by throwing them or by dying"
+set g_player_template_example_drop_weapons "default" "Whether the player can drop weapons by throwing them or by dying."
 
 // Item pickup section
 // Variables in this section define what happens during item pickup.
@@ -34,47 +37,60 @@ set g_player_template_example_drop_weapons "default" "Whether the player can dro
 // "<add|override> [health] [armor] [shells] [bullets] [rockets] [cells] [plasma] [fuel]"
 // For example "add 50" will give 50 health and the original item.
 // "override 0 0 5" will give 5 shells instead of the item.
-set g_player_template_example_pickup_health_small "default" "What items does player get when they pickup small health"
-set g_player_template_example_pickup_health_medium "default" "What items does player get when they pickup medium health"
-set g_player_template_example_pickup_health_big "default" "What items does player get when they pickup big health"
-set g_player_template_example_pickup_health_mega "default" "What items does player get when they pickup mega health"
-set g_player_template_example_pickup_armor_small "default" "What items does player get when they pickup small armor"
-set g_player_template_example_pickup_armor_medium "default" "What items does player get when they pickup medium armor"
-set g_player_template_example_pickup_armor_big "default" "What items does player get when they pickup big armor"
-set g_player_template_example_pickup_armor_mega "default" "What items does player get when they pickup mega armor"
-set g_player_template_example_pickup_item_shells "default" "What items does player get when they pickup shells"
-set g_player_template_example_pickup_item_bullets "default" "What items does player get when they pickup bullets"
-set g_player_template_example_pickup_item_rockets "default" "What items does player get when they pickup rockets"
-set g_player_template_example_pickup_item_cells "default" "What items does player get when they pickup cells"
-set g_player_template_example_pickup_weapon_machinegun "default" "What items does player get when they pickup a machinegun"
-set g_player_template_example_pickup_weapon_mortar "default" "What items does player get when they pickup a mortar"
-set g_player_template_example_pickup_weapon_electro "default" "What items does player get when they pickup an electro"
-set g_player_template_example_pickup_weapon_crylink "default" "What items does player get when they pickup a crylink"
-set g_player_template_example_pickup_weapon_vortex "default" "What items does player get when they pickup a vortex"
-set g_player_template_example_pickup_weapon_hagar "default" "What items does player get when they pickup a hagar"
-set g_player_template_example_pickup_weapon_devastator "default" "What items does player get when they pickup a devastator"
-set g_player_template_example_pickup_weapon_minelayer "default" "What items does player get when they pickup a mine layer"
-set g_player_template_example_pickup_weapon_hlac "default" "What items does player get when they pickup a HLAC"
-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_health_small "default" "What items does player get when they pickup small health."
+set g_player_template_example_pickup_health_medium "default" "What items does player get when they pickup medium health."
+set g_player_template_example_pickup_health_big "default" "What items does player get when they pickup big health."
+set g_player_template_example_pickup_health_mega "default" "What items does player get when they pickup mega health."
+set g_player_template_example_pickup_armor_small "default" "What items does player get when they pickup small armor."
+set g_player_template_example_pickup_armor_medium "default" "What items does player get when they pickup medium armor."
+set g_player_template_example_pickup_armor_big "default" "What items does player get when they pickup big armor."
+set g_player_template_example_pickup_armor_mega "default" "What items does player get when they pickup mega armor."
+set g_player_template_example_pickup_item_shells "default" "What items does player get when they pickup shells."
+set g_player_template_example_pickup_item_bullets "default" "What items does player get when they pickup bullets."
+set g_player_template_example_pickup_item_rockets "default" "What items does player get when they pickup rockets."
+set g_player_template_example_pickup_item_cells "default" "What items does player get when they pickup cells."
+set g_player_template_example_pickup_item_plasma "default" "What items does player get when they pickup plasma."
+set g_player_template_example_pickup_item_fuel "default" "What items does player get when they pickup fuel."
+set g_player_template_example_pickup_weapon_blaster "default" "What items does player get when they pickup a blaster."
+set g_player_template_example_pickup_weapon_shotgun "default" "What items does player get when they pickup a shotgun."
+set g_player_template_example_pickup_weapon_machinegun "default" "What items does player get when they pickup a machinegun."
+set g_player_template_example_pickup_weapon_mortar "default" "What items does player get when they pickup a mortar."
+set g_player_template_example_pickup_weapon_electro "default" "What items does player get when they pickup an electro."
+set g_player_template_example_pickup_weapon_crylink "default" "What items does player get when they pickup a crylink."
+set g_player_template_example_pickup_weapon_vortex "default" "What items does player get when they pickup a vortex."
+set g_player_template_example_pickup_weapon_hagar "default" "What items does player get when they pickup a hagar."
+set g_player_template_example_pickup_weapon_devastator "default" "What items does player get when they pickup a devastator."
+set g_player_template_example_pickup_weapon_shockwave "default" "What items does player get when they pickup a shockwave."
+set g_player_template_example_pickup_weapon_arc "default" "What items does player get when they pickup an arc."
+set g_player_template_example_pickup_weapon_hook "default" "What items does player get when they pickup a hook."
+set g_player_template_example_pickup_weapon_tuba "default" "What items does player get when they pickup a tuba."
+set g_player_template_example_pickup_weapon_porto "default" "What items does player get when they pickup a port-o-launch."
+set g_player_template_example_pickup_weapon_fireball "default" "What items does player get when they pickup a fireball."
+set g_player_template_example_pickup_weapon_minelayer "default" "What items does player get when they pickup a mine layer."
+set g_player_template_example_pickup_weapon_hlac "default" "What items does player get when they pickup a HLAC."
+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."
 // These weapons were dropped by other players.
-set g_player_template_example_pickup_weapon_dropped_shotgun "default" "What items does player get when they pickup a dropped shotgun"
-set g_player_template_example_pickup_weapon_dropped_machinegun "default" "What items does player get when they pickup a dropped machinegun"
-set g_player_template_example_pickup_weapon_dropped_mortar "default" "What items does player get when they pickup a dropped mortar"
-set g_player_template_example_pickup_weapon_dropped_electro "default" "What items does player get when they pickup a dropped electro"
-set g_player_template_example_pickup_weapon_dropped_crylink "default" "What items does player get when they pickup a dropped crylink"
-set g_player_template_example_pickup_weapon_dropped_vortex "default" "What items does player get when they pickup a dropped vortex"
-set g_player_template_example_pickup_weapon_dropped_hagar "default" "What items does player get when they pickup a dropped hagar"
-set g_player_template_example_pickup_weapon_dropped_devastator "default" "What items does player get when they pickup a dropped devastator"
-set g_player_template_example_pickup_weapon_dropped_minelayer "default" "What items does player get when they pickup a dropped mine layer"
-set g_player_template_example_pickup_weapon_dropped_hlac "default" "What items does player get when they pickup a dropped HLAC"
-set g_player_template_example_pickup_weapon_dropped_rifle "default" "What items does player get when they pickup a dropped rifle"
-set g_player_template_example_pickup_weapon_dropped_seeker "default" "What items does player get when they pickup a dropped TAG seeker"
-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_weapon_dropped_shotgun "default" "What items does player get when they pickup a dropped shotgun."
+set g_player_template_example_pickup_weapon_dropped_machinegun "default" "What items does player get when they pickup a dropped machinegun."
+set g_player_template_example_pickup_weapon_dropped_mortar "default" "What items does player get when they pickup a dropped mortar."
+set g_player_template_example_pickup_weapon_dropped_electro "default" "What items does player get when they pickup a dropped electro."
+set g_player_template_example_pickup_weapon_dropped_crylink "default" "What items does player get when they pickup a dropped crylink."
+set g_player_template_example_pickup_weapon_dropped_vortex "default" "What items does player get when they pickup a dropped vortex."
+set g_player_template_example_pickup_weapon_dropped_hagar "default" "What items does player get when they pickup a dropped hagar."
+set g_player_template_example_pickup_weapon_dropped_devastator "default" "What items does player get when they pickup a dropped devastator."
+set g_player_template_example_pickup_weapon_dropped_minelayer "default" "What items does player get when they pickup a dropped mine layer."
+set g_player_template_example_pickup_weapon_dropped_hlac "default" "What items does player get when they pickup a dropped HLAC."
+set g_player_template_example_pickup_weapon_dropped_rifle "default" "What items does player get when they pickup a dropped rifle."
+set g_player_template_example_pickup_weapon_dropped_seeker "default" "What items does player get when they pickup a dropped TAG seeker."
+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."
+set g_player_template_example_pickup_item_jetpack "default" "What items does player get when they pickup jetpack."
 
 // Damage section
 // Variables in this section define what happens during damage.
-set g_player_template_example_attack_scale "default" "How much player damages others. Higher values mean more damage"
-set g_player_template_example_defense_scale "default" "How much player gets damaged. Higher values mean less damage"
-set g_player_template_example_blaster_self_damage "default" "Whether player gets damaged with their own blaster"
+set g_player_template_example_attack_scale "default" "How much player damages others. Higher values mean more damage."
+set g_player_template_example_defense_scale "default" "How much player gets damaged. Higher values mean less damage."
+set g_player_template_example_blaster_self_damage "default" "Whether player gets damaged with their own blaster."
index a9fed4e0861ccfae514476beb9be95894dbae26a..64991ef5f294dd638f441241a86166a8594e0ce5 100644 (file)
@@ -713,6 +713,75 @@ float PlayerTemplateHook_ItemTouch(entity player, entity item, string template)
                                }
                        }
                }
+               case "item_plasma":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_item_plasma");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_ITEMPICKUP, VOL_BASE,
+                                               ATTEN_NORM);
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "weapon_blaster":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_weapon_blaster");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_ITEMPICKUP, VOL_BASE,
+                                               ATTEN_NORM);
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "weapon_shotgun":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_weapon_shotgun");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_ITEMPICKUP, VOL_BASE,
+                                               ATTEN_NORM);
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
                case "weapon_machinegun":
                case "weapon_uzi":
                {
@@ -737,6 +806,7 @@ float PlayerTemplateHook_ItemTouch(entity player, entity item, string template)
                                }
                        }
                }
+               case "weapon_mortar":
                case "weapon_grenadelauncher":
                {
                        float result = PlayerTemplate_GivePlayerItem(player, template,
@@ -806,6 +876,7 @@ float PlayerTemplateHook_ItemTouch(entity player, entity item, string template)
                                }
                        }
                }
+               case "weapon_vortex":
                case "weapon_nex":
                {
                        float result = PlayerTemplate_GivePlayerItem(player, template,
@@ -852,6 +923,7 @@ float PlayerTemplateHook_ItemTouch(entity player, entity item, string template)
                                }
                        }
                }
+               case "weapon_devastator":
                case "weapon_rocketlauncher":
                {
                        float result = PlayerTemplate_GivePlayerItem(player, template,
@@ -875,6 +947,167 @@ float PlayerTemplateHook_ItemTouch(entity player, entity item, string template)
                                }
                        }
                }
+               case "weapon_shockwave":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_weapon_shockwave");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_WEAPONPICKUP, VOL_BASE,
+                                               ATTEN_NORM);
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "weapon_arc":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_weapon_arc");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_WEAPONPICKUP, VOL_BASE,
+                                               ATTEN_NORM);
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "weapon_hook":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_weapon_hook");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_WEAPONPICKUP, VOL_BASE,
+                                               ATTEN_NORM);
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "weapon_tuba":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_weapon_tuba");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_WEAPONPICKUP, VOL_BASE,
+                                               ATTEN_NORM);
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "weapon_porto":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_weapon_porto");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_WEAPONPICKUP, VOL_BASE,
+                                               ATTEN_NORM);
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "weapon_fireball":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_weapon_fireball");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_WEAPONPICKUP, VOL_BASE,
+                                               ATTEN_NORM);
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "weapon_vaporizer":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_weapon_vaporizer");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_WEAPONPICKUP, VOL_BASE,
+                                               ATTEN_NORM);
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
                case "droppedweapon":
                {
                        float result;
@@ -1075,17 +1308,155 @@ float PlayerTemplateHook_ItemTouch(entity player, entity item, string template)
                                }
                        }
                }
-               default:
+               case "item_fuel_regen":
                {
-                       switch (item.netname)
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_item_fuel_regen");
+                       switch (result)
                        {
-                               case "Vaporizer Ammo":
-                               case "Extra life":
-                               case "Invisibility":
-                               case "Speed":
+                               case MUT_ITEMTOUCH_CONTINUE:
                                {
                                        return MUT_ITEMTOUCH_CONTINUE;
                                }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_Shield, VOL_BASE,
+                                               ATTEN_NORM); //TODO: Fix.
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "item_jetpack":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_item_jetpack");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_Shield, VOL_BASE,
+                                               ATTEN_NORM); //TODO: Fix.
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "item_vaporizer_cells":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_item_vaporizer_cells");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_Shield, VOL_BASE,
+                                               ATTEN_NORM); //TODO: Fix.
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "item_invisibility":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_item_invisibility");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_Shield, VOL_BASE,
+                                               ATTEN_NORM); //TODO: Fix.
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "item_extralife":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_item_extralife");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_Shield, VOL_BASE,
+                                               ATTEN_NORM); //TODO: Fix.
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               case "item_speed":
+               {
+                       float result = PlayerTemplate_GivePlayerItem(player, template,
+                               "pickup_item_speed");
+                       switch (result)
+                       {
+                               case MUT_ITEMTOUCH_CONTINUE:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                               case MUT_ITEMTOUCH_RETURN:
+                               {
+                                       Item_ScheduleRespawn(item);
+                                       sound(player, CH_TRIGGER, SND_Shield, VOL_BASE,
+                                               ATTEN_NORM); //TODO: Fix.
+                                       return MUT_ITEMTOUCH_RETURN;
+                               }
+                               default:
+                               {
+                                       return MUT_ITEMTOUCH_CONTINUE;
+                               }
+                       }
+               }
+               default:
+               {
+                       switch (item.netname)
+                       {
+                               //case "Vaporizer Ammo":
+                               //case "Extra life":
+                               //case "Invisibility":
+                               //case "Speed":
+                               //{
+                               //      return MUT_ITEMTOUCH_CONTINUE;
+                               //}
                                default:
                                {
                                        PrintToChatAll(strcat("Unrecognized item, classname: ",