]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon.qh
REPLICATE_FIELD -> REPLICATE_INIT
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon.qh
index 2d176c04e639d66cd630668513006483f174f754..83f3f4a0febd438e9f817f3ba9010bd747f78992 100644 (file)
@@ -56,8 +56,14 @@ CLASS(Weapon, Object)
     ATTRIB(Weapon, wpcolor, vector, '0 0 0');
     /** M: modelname : name of model (without g_ v_ or h_ prefixes) */
     ATTRIB(Weapon, mdl, string, "");
+#ifdef GAMEQC
     /** M: model MDL_id_ITEM */
     ATTRIB(Weapon, m_model, entity);
+    /** M: flash model MDL_id_MUZZLEFLASH */
+    ATTRIB(Weapon, m_muzzlemodel, entity, MDL_Null);
+    /** M: flash effect EFFECT_id_MUZZLEFLASH */
+    ATTRIB(Weapon, m_muzzleeffect, entity);
+#endif
     /** M: crosshair : per-weapon crosshair: "CrosshairImage Size" */
     ATTRIB(Weapon, w_crosshair, string, "gfx/crosshairmoustache");
     /** A: crosshair : per-weapon crosshair size (argument two of "crosshair" field) */
@@ -130,11 +136,7 @@ void weapon_defaultspawnfunc(entity this, Weapon e);
     spawnfunc(name) { weapon_defaultspawnfunc(this, weapon); }
 
 #define SPAWNFUNC_WEAPON_COND(name, cond, wep1, wep2) \
-    spawnfunc(name) \
-    { \
-        entity wep = (cond) ? wep1 : wep2; \
-        weapon_defaultspawnfunc(this, wep); \
-    }
+       SPAWNFUNC_WEAPON(name, (cond ? wep1 : wep2))
 
 #else
 
@@ -225,6 +227,8 @@ string GetAmmoPicture(int ammotype);
 
 string GetAmmoName(int ammotype);
 
+entity GetAmmoItem(int ammotype);
+
 #ifdef CSQC
 int GetAmmoTypeFromNum(int i);
 int GetAmmoStat(int ammotype);