]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/item.qh
Merge branch 'master' into Mario/hagar_notfixed
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item.qh
index ba21efd96610624235ab8fadaee2fb31994f2c45..4ab7af4f2317341ebeb4d1f625dfb8659cecb3d8 100644 (file)
@@ -39,7 +39,6 @@ const int IT_UNLIMITED_AMMO                   = IT_UNLIMITED_WEAPON_AMMO | IT_UNLIMITE
 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__)
-/** If you register a new item, make sure to add it to all.inc */
 CLASS(GameItem, Object)
     ATTRIB(GameItem, m_id, int, 0)
     ATTRIB(GameItem, m_name, string, string_null)
@@ -47,10 +46,16 @@ CLASS(GameItem, Object)
     ATTRIB(GameItem, m_color, vector, '1 1 1')
     ATTRIB(GameItem, m_waypoint, string, string_null)
     ATTRIB(GameItem, m_waypointblink, int, 1)
-    METHOD(GameItem, display, void(GameItem this, void(string name, string icon) returns)) {
+    METHOD(GameItem, display, void(GameItem this, void(string name, string icon) returns))
+    {
+        TC(GameItem, this);
         returns(this.m_name, this.m_icon ? sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon) : string_null);
     }
-    METHOD(GameItem, show, void(GameItem this)) { LOG_INFO("A game item\n"); }
+    METHOD(GameItem, show, void(GameItem this))
+    {
+        TC(GameItem, this);
+        LOG_INFO("A game item\n");
+    }
     void ITEM_HANDLE(Show, GameItem this) { this.show(this); }
 ENDCLASS(GameItem)