X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fitem%2Farmor.qh;h=93e76bf88481c186d9a99952bd7aa15577e427a4;hp=48a80f886af4f8278d0326e0f85d17969cdfc2b3;hb=26693a3ac060825ce6c7f170d4e65f7ac2a1fb25;hpb=c6d440124df99b8b1f48fe7666332273535eb413 diff --git a/qcsrc/common/items/item/armor.qh b/qcsrc/common/items/item/armor.qh index 48a80f886a..93e76bf884 100644 --- a/qcsrc/common/items/item/armor.qh +++ b/qcsrc/common/items/item/armor.qh @@ -1,9 +1,100 @@ -#ifndef ARMOR_H -#define ARMOR_H +#pragma once + #include "pickup.qh" CLASS(Armor, Pickup) #ifdef SVQC - ATTRIB(Armor, m_pickupevalfunc, float(entity player, entity item), commodity_pickupevalfunc) + ATTRIB(Armor, m_mins, vector, '-16 -16 0'); + ATTRIB(Armor, m_maxs, vector, '16 16 48'); + ATTRIB(Armor, m_pickupevalfunc, float(entity player, entity item), commodity_pickupevalfunc); #endif ENDCLASS(Armor) + +#ifdef SVQC + #include +#endif + +#ifdef GAMEQC +MODEL(ArmorSmall_ITEM, Item_Model("item_armor_small.md3")); +SOUND(ArmorSmall, "misc/armor1"); +#endif + +REGISTER_ITEM(ArmorSmall, Armor) { +#ifdef GAMEQC + this.m_model = MDL_ArmorSmall_ITEM; + this.m_sound = SND_ArmorSmall; +#endif + this.m_name = "5 Armor"; + this.m_icon = "armor"; +#ifdef SVQC + this.m_botvalue = BOT_PICKUP_RATING_LOW; + this.m_itemid = IT_ARMOR_SHARD; + this.m_respawntime = GET(g_pickup_respawntime_short); + this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short); +#endif +} + +#ifdef GAMEQC +MODEL(ArmorMedium_ITEM, Item_Model("item_armor_medium.md3")); +SOUND(ArmorMedium, "misc/armor10"); +#endif + +REGISTER_ITEM(ArmorMedium, Armor) { +#ifdef GAMEQC + this.m_model = MDL_ArmorMedium_ITEM; + this.m_sound = SND_ArmorMedium; +#endif + this.m_name = "25 Armor"; + this.m_icon = "armor"; +#ifdef SVQC + this.m_botvalue = BOT_PICKUP_RATING_MID; + this.m_itemid = IT_ARMOR; + this.m_respawntime = GET(g_pickup_respawntime_medium); + this.m_respawntimejitter = GET(g_pickup_respawntimejitter_medium); +#endif +} + +#ifdef GAMEQC +MODEL(ArmorBig_ITEM, Item_Model("item_armor_big.md3")); +SOUND(ArmorBig, "misc/armor17_5"); +#endif + +REGISTER_ITEM(ArmorBig, Armor) { +#ifdef GAMEQC + this.m_model = MDL_ArmorBig_ITEM; + this.m_sound = SND_ArmorBig; +#endif + this.m_name = "50 Armor"; + this.m_icon = "armor"; + this.m_color = '0 1 0'; + this.m_waypoint = _("Big armor"); +#ifdef SVQC + this.m_botvalue = 20000; // FIXME: higher than BOT_PICKUP_RATING_HIGH? + this.m_itemid = IT_ARMOR; + this.m_respawntime = GET(g_pickup_respawntime_long); + this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long); +#endif +} + +#ifdef GAMEQC +MODEL(ArmorMega_ITEM, Item_Model("item_armor_large.md3")); +SOUND(ArmorMega, "misc/armor25"); +#endif + +REGISTER_ITEM(ArmorMega, Armor) { +#ifdef GAMEQC + this.m_model = MDL_ArmorMega_ITEM; + this.m_sound = SND_ArmorMega; +#endif + this.m_name = "100 Armor"; + this.m_icon = "item_large_armor"; + this.m_color = '0 1 0'; + this.m_waypoint = _("Mega armor"); + this.m_waypointblink = 2; +#ifdef SVQC + this.m_maxs = '16 16 70'; + this.m_botvalue = BOT_PICKUP_RATING_HIGH; + this.m_itemid = IT_ARMOR; + this.m_respawntime = GET(g_pickup_respawntime_long); + this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long); #endif +}