X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fitem%2Fpowerup.qc;h=a1b2f14037fcc7394325624c56beb7406f5d5041;hb=70b84d37e2cf1d5336c327cb43593024de2a2c6c;hp=f10a97e54ff8770b2660ecad293f5cc70d0a67b0;hpb=fc2be4c1e7547ae97301f7966333e4dc858baf92;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/items/item/powerup.qc b/qcsrc/common/items/item/powerup.qc index f10a97e54..a1b2f1403 100644 --- a/qcsrc/common/items/item/powerup.qc +++ b/qcsrc/common/items/item/powerup.qc @@ -1,40 +1,39 @@ #include "powerup.qh" -#include "../../../server/t_items.qh" -#define WITH(it) this.m_##it; -#define CONFIGURE(...) MAP(WITH, __VA_ARGS__) -#define DEFINE(id, ...) \ - REGISTER_ITEM(id, Ammo, LAMBDA( \ - IF(SV, CONFIGURE \ - , botvalue = 100000 \ - , itemflags = FL_POWERUP \ - , respawntime = GET(g_pickup_respawntime_powerup) \ - , respawntimejitter = GET(g_pickup_respawntimejitter_powerup) \ - ) \ - UNWORDS(__VA_ARGS__) \ - )) +#ifndef SVQC +.int m_itemid; +#endif -DEFINE(Strength - ,APPLY(CONFIGURE - , model = "models/items/g_strength.md3" - , sound = "misc/powerup.wav" - , name = "Strength Powerup" - ) - ,IF(SV, CONFIGURE - , itemid = IT_STRENGTH - ) -) -DEFINE(Shield - ,APPLY(CONFIGURE - , model = "models/items/g_invincible.md3" - , sound = "misc/powerup_shield.wav" - , name = "Shield" - ) - ,IF(SV, CONFIGURE - , itemid = IT_INVINCIBLE - ) -) +#ifndef MENUQC +MODEL(Strength_ITEM, Item_Model("g_strength.md3")); +#endif -#undef WITH -#undef CONFIGURE -#undef DEFINE +REGISTER_ITEM(Strength, Powerup) { +#ifndef MENUQC + this.m_model = MDL_Strength_ITEM; +#endif + this.m_sound = "misc/powerup.wav"; + this.m_name = "Strength Powerup"; + this.m_icon = "strength"; + this.m_color = '0 0 1'; + this.m_waypoint = _("Strength"); + this.m_waypointblink = 2; + this.m_itemid = IT_STRENGTH; +} + +#ifndef MENUQC +MODEL(Shield_ITEM, Item_Model("g_invincible.md3")); +#endif + +REGISTER_ITEM(Shield, Powerup) { +#ifndef MENUQC + this.m_model = MDL_Shield_ITEM; +#endif + this.m_sound = "misc/powerup_shield.wav"; + this.m_name = "Shield"; + this.m_icon = "shield"; + this.m_color = '1 0 1'; + this.m_waypoint = _("Shield"); + this.m_waypointblink = 2; + this.m_itemid = IT_INVINCIBLE; +}