X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fitem.qh;h=f3aa0cec26b067f47244b96c4af521028b677991;hp=4ab7af4f2317341ebeb4d1f625dfb8659cecb3d8;hb=936e07981f6ca4beacadd708ca991895f4f74596;hpb=d271f27a5ac351a3a7b39636932f6d661492be1d diff --git a/qcsrc/common/items/item.qh b/qcsrc/common/items/item.qh index 4ab7af4f23..f3aa0cec26 100644 --- a/qcsrc/common/items/item.qh +++ b/qcsrc/common/items/item.qh @@ -1,5 +1,5 @@ -#ifndef GAMEITEM_H -#define GAMEITEM_H +#pragma once +#include const int IT_UNLIMITED_WEAPON_AMMO = BIT(0); // when this bit is set, using a weapon does not reduce ammo. Checkpoints can give this powerup. const int IT_UNLIMITED_SUPERWEAPONS = BIT(1); // when this bit is set, superweapons don't expire. Checkpoints can give this powerup. @@ -34,18 +34,21 @@ const int IT_SUPERWEAPON = BIT(21); // suit const int IT_STRENGTH = BIT(22); // item masks -const int IT_AMMO = IT_FUEL | IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS | IT_PLASMA; const int IT_UNLIMITED_AMMO = IT_UNLIMITED_WEAPON_AMMO | IT_UNLIMITED_SUPERWEAPONS; const int IT_PICKUPMASK = IT_UNLIMITED_AMMO | IT_JETPACK | IT_FUEL_REGEN; // strength and invincible are handled separately #define ITEM_HANDLE(signal, ...) __Item_Send_##signal(__VA_ARGS__) CLASS(GameItem, Object) - ATTRIB(GameItem, m_id, int, 0) - ATTRIB(GameItem, m_name, string, string_null) - ATTRIB(GameItem, m_icon, string, string_null) - ATTRIB(GameItem, m_color, vector, '1 1 1') - ATTRIB(GameItem, m_waypoint, string, string_null) - ATTRIB(GameItem, m_waypointblink, int, 1) + ATTRIB(GameItem, m_id, int, 0); + ATTRIB(GameItem, m_name, string); + ATTRIB(GameItem, m_icon, string); + ATTRIB(GameItem, m_color, vector, '1 1 1'); + ATTRIB(GameItem, m_waypoint, string); + ATTRIB(GameItem, m_waypointblink, int, 1); +#ifdef GAMEQC + ATTRIB(GameItem, m_glow, bool, false); + ATTRIB(GameItem, m_respawnsound, Sound, SND_ITEMRESPAWN); +#endif METHOD(GameItem, display, void(GameItem this, void(string name, string icon) returns)) { TC(GameItem, this); @@ -58,5 +61,3 @@ CLASS(GameItem, Object) } void ITEM_HANDLE(Show, GameItem this) { this.show(this); } ENDCLASS(GameItem) - -#endif