+/// \brief Returns a random classname of the overkill map item.
+/// \return Random classname of the overkill map item.
+string RandomItems_GetRandomOverkillMapItemClassName()
+{
+ RandomSelection_Init();
+ if (!autocvar_g_overkill_filter_healthmega)
+ {
+ RandomSelection_AddFloat(RANDOM_ITEM_SUBTYPE_OVERKILL_HEALTH_MEGA,
+ autocvar_g_random_items_overkill_health_mega_probability, 1);
+ }
+ RandomSelection_AddFloat(RANDOM_ITEM_SUBTYPE_OVERKILL_ARMOR_SMALL,
+ autocvar_g_random_items_overkill_armor_small_probability, 1);
+ if (!autocvar_g_overkill_filter_armormedium)
+ {
+ RandomSelection_AddFloat(RANDOM_ITEM_SUBTYPE_OVERKILL_ARMOR_MEDIUM,
+ autocvar_g_random_items_overkill_armor_medium_probability, 1);
+ }
+ if (!autocvar_g_overkill_filter_armorbig)
+ {
+ RandomSelection_AddFloat(RANDOM_ITEM_SUBTYPE_OVERKILL_ARMOR_BIG,
+ autocvar_g_random_items_overkill_armor_big_probability, 1);
+ }
+ if (!autocvar_g_overkill_filter_armormega)
+ {
+ RandomSelection_AddFloat(RANDOM_ITEM_SUBTYPE_OVERKILL_ARMOR_MEGA,
+ autocvar_g_random_items_overkill_armor_mega_probability, 1);
+ }
+ RandomSelection_AddFloat(RANDOM_ITEM_SUBTYPE_OVERKILL_WEAPON_HMG,
+ autocvar_g_random_items_overkill_weapon_hmg_probability, 1);
+ RandomSelection_AddFloat(RANDOM_ITEM_SUBTYPE_OVERKILL_WEAPON_RPC,
+ autocvar_g_random_items_overkill_weapon_rpc_probability, 1);
+ int item_type = RandomSelection_chosen_float;
+ switch (item_type)
+ {
+ case RANDOM_ITEM_SUBTYPE_OVERKILL_HEALTH_MEGA:
+ {
+ return "item_health_mega";
+ }
+ case RANDOM_ITEM_SUBTYPE_OVERKILL_ARMOR_SMALL:
+ {
+ return "item_armor_small";
+ }
+ case RANDOM_ITEM_SUBTYPE_OVERKILL_ARMOR_MEDIUM:
+ {
+ return "item_armor_medium";
+ }
+ case RANDOM_ITEM_SUBTYPE_OVERKILL_ARMOR_BIG:
+ {
+ return "item_armor_big";
+ }
+ case RANDOM_ITEM_SUBTYPE_OVERKILL_ARMOR_MEGA:
+ {
+ return "item_armor_mega";
+ }
+ case RANDOM_ITEM_SUBTYPE_OVERKILL_WEAPON_HMG:
+ {
+ return "weapon_hmg";
+ }
+ case RANDOM_ITEM_SUBTYPE_OVERKILL_WEAPON_RPC:
+ {
+ return "weapon_rpc";
+ }
+ }
+ return "";
+}
+