X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fitem%2Fhealth.qc;h=93ba2f36e2ab1669bd3b707db541b9a85eac0bd3;hb=d271f27a5ac351a3a7b39636932f6d661492be1d;hp=64fdee45ba703949959545075759a1e2a34356bc;hpb=f604d84f61f6db78cf9cb7c3cc6b9cfe7f14278f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/items/item/health.qc b/qcsrc/common/items/item/health.qc index 64fdee45b..93ba2f36e 100644 --- a/qcsrc/common/items/item/health.qc +++ b/qcsrc/common/items/item/health.qc @@ -1,66 +1,89 @@ #include "health.qh" -#include "../../../server/t_items.qh" +#ifdef SVQC + #include +#endif -#define WITH(it) this.m_##it; -#define CONFIGURE(...) MAP(WITH, __VA_ARGS__) -#define DEFINE(id, ...) REGISTER_ITEM(id, Health, MAP(IDENTITY, __VA_ARGS__)) +#ifndef MENUQC +MODEL(HealthSmall_ITEM, Item_Model("g_h1.md3")); +SOUND(HealthSmall, "misc/minihealth"); +#endif -DEFINE(HealthSmall - ,IF(ALL, CONFIGURE - , model = "models/items/g_h1.md3" - , sound = "misc/minihealth.wav" - , name = "5 Health" - , itemid = IT_5HP - ) - ,IF(SV, CONFIGURE - , botvalue = BOT_PICKUP_RATING_LOW - , respawntime = g_pickup_respawntime_short - , respawntimejitter = g_pickup_respawntimejitter_short - ) -) +REGISTER_ITEM(HealthSmall, Health) { +#ifndef MENUQC + this.m_model = MDL_HealthSmall_ITEM; + this.m_sound = SND_HealthSmall; +#endif + this.m_name = "5 Health"; + this.m_icon = "health"; +#ifdef SVQC + this.m_botvalue = BOT_PICKUP_RATING_LOW; + this.m_itemid = IT_5HP; + this.m_respawntime = GET(g_pickup_respawntime_short); + this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short); +#endif +} -DEFINE(HealthMedium - ,IF(ALL, CONFIGURE - , model = "models/items/g_h25.md3" - , sound = "misc/mediumhealth.wav" - , name = "25 Health" - , itemid = IT_25HP - ) - ,IF(SV, CONFIGURE - , botvalue = BOT_PICKUP_RATING_MID - , respawntime = g_pickup_respawntime_short - , respawntimejitter = g_pickup_respawntimejitter_short - ) -) +#ifndef MENUQC +MODEL(HealthMedium_ITEM, Item_Model("g_h25.md3")); +SOUND(HealthMedium, "misc/mediumhealth"); +#endif -DEFINE(HealthLarge - ,IF(ALL, CONFIGURE - , model = "models/items/g_h50.md3" - , sound = "misc/mediumhealth.wav" - , name = "50 Health" - , itemid = IT_25HP - ) - ,IF(SV, CONFIGURE - , botvalue = BOT_PICKUP_RATING_MID - , respawntime = g_pickup_respawntime_medium - , respawntimejitter = g_pickup_respawntimejitter_medium - ) -) +REGISTER_ITEM(HealthMedium, Health) { +#ifndef MENUQC + this.m_model = MDL_HealthMedium_ITEM; + this.m_sound = SND_HealthMedium; +#endif + this.m_name = "25 Health"; + this.m_icon = "health"; +#ifdef SVQC + this.m_botvalue = BOT_PICKUP_RATING_MID; + this.m_itemid = IT_25HP; + this.m_respawntime = GET(g_pickup_respawntime_short); + this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short); +#endif +} -DEFINE(HealthMega - ,IF(ALL, CONFIGURE - , model = "models/items/g_h100.md3" - , sound = "misc/megahealth.wav" - , name = "100 Health" - , itemid = IT_HEALTH - ) - ,IF(SV, CONFIGURE - , botvalue = BOT_PICKUP_RATING_HIGH - , respawntime = g_pickup_respawntime_long - , respawntimejitter = g_pickup_respawntimejitter_long - ) -) +#ifndef MENUQC +MODEL(HealthLarge_ITEM, Item_Model("g_h50.md3")); +SOUND(HealthLarge, "misc/mediumhealth"); +#endif -#undef WITH -#undef CONFIGURE -#undef DEFINE +REGISTER_ITEM(HealthLarge, Health) { +#ifndef MENUQC + this.m_model = MDL_HealthLarge_ITEM; + this.m_sound = SND_HealthLarge; +#endif + this.m_name = "50 Health"; + this.m_icon = "health"; + this.m_color = '1 0 0'; + this.m_waypoint = _("Large health"); +#ifdef SVQC + this.m_botvalue = BOT_PICKUP_RATING_MID; + this.m_itemid = IT_25HP; + this.m_respawntime = GET(g_pickup_respawntime_medium); + this.m_respawntimejitter = GET(g_pickup_respawntimejitter_medium); +#endif +} + +#ifndef MENUQC +MODEL(HealthMega_ITEM, Item_Model("g_h100.md3")); +SOUND(HealthMega, "misc/megahealth"); +#endif + +REGISTER_ITEM(HealthMega, Health) { +#ifndef MENUQC + this.m_model = MDL_HealthMega_ITEM; + this.m_sound = SND_HealthMega; +#endif + this.m_name = "100 Health"; + this.m_icon = "item_mega_health"; + this.m_color = '1 0 0'; + this.m_waypoint = _("Mega health"); + this.m_waypointblink = 2; +#ifdef SVQC + this.m_botvalue = BOT_PICKUP_RATING_HIGH; + this.m_itemid = IT_HEALTH; + this.m_respawntime = GET(g_pickup_respawntime_long); + this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long); +#endif +}