]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/vortex.qh
Simplify REGISTER_WEAPON (and avoid adding redundant globals), now possible thanks...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / vortex.qh
index 783e42a8ea567d146eb1e1dae62f91d9d666d7f3..e2f7c4f4feb9e2707ff6b2e3632c159211d65036 100644 (file)
@@ -2,7 +2,7 @@
 
 CLASS(Vortex, Weapon)
 /* spawnfunc */ ATTRIB(Vortex, m_canonical_spawnfunc, string, "weapon_vortex");
-/* ammotype  */ ATTRIB(Vortex, ammo_type, int, RES_CELLS);
+/* ammotype  */ ATTRIB(Vortex, ammo_type, Resource, RES_CELLS);
 /* impulse   */ ATTRIB(Vortex, impulse, int, 7);
 /* flags     */ ATTRIB(Vortex, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
 /* rating    */ ATTRIB(Vortex, bot_pickupbasevalue, float, 8000);
@@ -10,6 +10,8 @@ CLASS(Vortex, Weapon)
 /* modelname */ ATTRIB(Vortex, mdl, string, "nex");
 #ifdef GAMEQC
 /* model     */ ATTRIB(Vortex, m_model, Model, MDL_VORTEX_ITEM);
+/* flash mdl */ ATTRIB(Vortex, m_muzzlemodel, Model, MDL_Null);
+/* flash eff */ ATTRIB(Vortex, m_muzzleeffect, entity, EFFECT_VORTEX_MUZZLEFLASH);
 #endif
 /* crosshair */ ATTRIB(Vortex, w_crosshair, string, "gfx/crosshairnex");
 /* crosshair */ ATTRIB(Vortex, w_crosshair_size, float, 0.65);
@@ -17,6 +19,7 @@ CLASS(Vortex, Weapon)
 /* wepimg    */ ATTRIB(Vortex, model2, string, "weaponnex");
 /* refname   */ ATTRIB(Vortex, netname, string, "vortex");
 /* wepname   */ ATTRIB(Vortex, m_name, string, _("Vortex"));
+/* legacy    */ ATTRIB(Vortex, m_deprecated_netname, string, "nex");
 
 #define X(BEGIN, P, END, class, prefix) \
        BEGIN(class) \
@@ -60,12 +63,18 @@ CLASS(Vortex, Weapon)
 #undef X
 
 ENDCLASS(Vortex)
-REGISTER_WEAPON(VORTEX, vortex, NEW(Vortex));
+REGISTER_WEAPON(VORTEX, NEW(Vortex));
 
 SPAWNFUNC_WEAPON(weapon_vortex, WEP_VORTEX)
 SPAWNFUNC_WEAPON(weapon_nex, WEP_VORTEX)
 
+#ifdef CSQC
+bool autocvar_cl_particles_oldvortexbeam;
+#endif
+
 #ifdef SVQC
+.float vortex_charge_rottime;
+
 .float vortex_lasthit;
 
 void W_Vortex_Charge(entity actor, .entity weaponentity, float dt);