]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/nades/nades.qh
ATTRIB: overload default value, require semicolon
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / nades / nades.qh
index 2df71131654ca739ae441f5d0a84f6cfee7d1653..a7eed65d33aceb29f20ee28d94228ad3eb2a4331 100644 (file)
@@ -28,12 +28,12 @@ REGISTRY_CHECK(Nades)
 #define REGISTER_NADE(id) REGISTER(Nades, NADE_TYPE, id, m_id, NEW(Nade))
 
 CLASS(Nade, Object)
-    ATTRIB(Nade, m_id, int, 0)
-    ATTRIB(Nade, m_color, vector, '0 0 0')
-    ATTRIB(Nade, m_name, string, _("Grenade"))
-    ATTRIB(Nade, m_icon, string, "nade_normal")
-    ATTRIBARRAY(Nade, m_projectile, int, 2)
-    ATTRIBARRAY(Nade, m_trail, entity, 2)
+    ATTRIB(Nade, m_id, int, 0);
+    ATTRIB(Nade, m_color, vector, '0 0 0');
+    ATTRIB(Nade, m_name, string, _("Grenade"));
+    ATTRIB(Nade, m_icon, string, "nade_normal");
+    ATTRIBARRAY(Nade, m_projectile, int, 2);
+    ATTRIBARRAY(Nade, m_trail, entity, 2);
     METHOD(Nade, display, void(entity this, void(string name, string icon) returns)) {
         returns(this.m_name, sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon));
     }
@@ -92,11 +92,12 @@ void(entity player, float score) nades_GiveBonus;
  * called to adjust nade damage and force on hit
  */
 #define EV_Nade_Damage(i, o) \
-       /** weapon */ i(entity, MUTATOR_ARGV_0_entity) \
-    /** force */  i(vector, MUTATOR_ARGV_0_vector) \
-    /**/          o(vector, MUTATOR_ARGV_0_vector) \
-       /** damage */ i(float,  MUTATOR_ARGV_0_float) \
-    /**/          o(float,  MUTATOR_ARGV_0_float) \
+    /** nade */   i(entity, MUTATOR_ARGV_0_entity) \
+       /** weapon */ i(entity, MUTATOR_ARGV_1_entity) \
+    /** force */  i(vector, MUTATOR_ARGV_2_vector) \
+    /**/          o(vector, MUTATOR_ARGV_2_vector) \
+       /** damage */ i(float,  MUTATOR_ARGV_3_float) \
+    /**/          o(float,  MUTATOR_ARGV_3_float) \
     /**/
 MUTATOR_HOOKABLE(Nade_Damage, EV_Nade_Damage);