X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fitem%2Farmor.qc;h=13a774ebcec18f693120f19e7b89982d688fe788;hb=32ca966802c45c4c231210c2d8776bc3f4135dc2;hp=8fed098ac190f5b7229fb94a1961f8368ddd852b;hpb=88713a575bd27dabc5926d636542b6145ab6f51c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/items/item/armor.qc b/qcsrc/common/items/item/armor.qc index 8fed098ac..13a774ebc 100644 --- a/qcsrc/common/items/item/armor.qc +++ b/qcsrc/common/items/item/armor.qc @@ -3,66 +3,83 @@ #include "../../../server/t_items.qh" #endif -#define WITH(it) this.m_##it; -#define CONFIGURE(...) MAP(WITH, __VA_ARGS__) -#define DEFINE(id, ...) REGISTER_ITEM(id, Armor, UNWORDS(__VA_ARGS__)) +#ifndef MENUQC +MODEL(ArmorSmall_ITEM, Item_Model("item_armor_small.md3")); +#endif + +REGISTER_ITEM(ArmorSmall, Armor) { +#ifndef MENUQC + this.m_model = MDL_ArmorSmall_ITEM; +#endif + this.m_sound = "misc/armor1.wav"; + 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 +} -DEFINE(ArmorSmall - ,APPLY(CONFIGURE - , model = "models/items/item_armor_small.md3" - , sound = "misc/armor1.wav" - , name = "5 Armor" - ) - ,IF(SV, CONFIGURE - , botvalue = BOT_PICKUP_RATING_LOW - , itemid = IT_ARMOR_SHARD - , respawntime = GET(g_pickup_respawntime_short) - , respawntimejitter = GET(g_pickup_respawntimejitter_short) - ) -) +#ifndef MENUQC +MODEL(ArmorMedium_ITEM, Item_Model("item_armor_medium.md3")); +#endif + +REGISTER_ITEM(ArmorMedium, Armor) { +#ifndef MENUQC + this.m_model = MDL_ArmorMedium_ITEM; +#endif + this.m_sound = "misc/armor10.wav"; + 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 +} -DEFINE(ArmorMedium - ,APPLY(CONFIGURE - , model = "models/items/item_armor_medium.md3" - , sound = "misc/armor10.wav" - , name = "25 Armor" - ) - ,IF(SV, CONFIGURE - , botvalue = BOT_PICKUP_RATING_MID - , itemid = IT_ARMOR - , respawntime = GET(g_pickup_respawntime_medium) - , respawntimejitter = GET(g_pickup_respawntimejitter_medium) - ) -) +#ifndef MENUQC +MODEL(ArmorLarge_ITEM, Item_Model("item_armor_big.md3")); +#endif -DEFINE(ArmorBig - ,APPLY(CONFIGURE - , model = "models/items/item_armor_big.md3" - , sound = "misc/armor17_5.wav" - , name = "50 Armor" - ) - ,IF(SV, CONFIGURE - , botvalue = 20000 // FIXME: higher than BOT_PICKUP_RATING_HIGH? - , itemid = IT_ARMOR - , respawntime = GET(g_pickup_respawntime_long) - , respawntimejitter = GET(g_pickup_respawntimejitter_long) - ) -) +REGISTER_ITEM(ArmorLarge, Armor) { +#ifndef MENUQC + this.m_model = MDL_ArmorLarge_ITEM; +#endif + this.m_sound = "misc/armor17_5.wav"; + this.m_name = "50 Armor"; + this.m_icon = "armor"; + this.m_color = '0 1 0'; + this.m_waypoint = _("Large 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 +} -DEFINE(ArmorLarge - ,APPLY(CONFIGURE - , model = "models/items/item_armor_large.md3" - , sound = "misc/armor25.wav" - , name = "100 Armor" - ) - ,IF(SV, CONFIGURE - , botvalue = BOT_PICKUP_RATING_HIGH - , itemid = IT_ARMOR - , respawntime = GET(g_pickup_respawntime_long) - , respawntimejitter = GET(g_pickup_respawntimejitter_long) - ) -) +#ifndef MENUQC +MODEL(ArmorMega_ITEM, Item_Model("item_armor_large.md3")); +#endif -#undef WITH -#undef CONFIGURE -#undef DEFINE +REGISTER_ITEM(ArmorMega, Armor) { +#ifndef MENUQC + this.m_model = MDL_ArmorMega_ITEM; +#endif + this.m_sound = "misc/armor25.wav"; + 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_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 +}