]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/blaster.qh
Push down spawning logic from spawnfuncs to dedicated spawning functions
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / blaster.qh
index 40e453511dd1968fabac276c460f16f67a96cb8e..0a0e7c17d2f57c21cdbee6d3735f0576c566377e 100644 (file)
@@ -1,6 +1,7 @@
 #pragma once
 
 CLASS(Blaster, Weapon)
+/* spawnfunc */ ATTRIB(Blaster, m_canonical_spawnfunc, string, "weapon_blaster");
 /* ammotype  */ //ATTRIB(Blaster, ammo_type, int, RESOURCE_NONE);
 /* impulse   */ ATTRIB(Blaster, impulse, int, 1);
 /* flags     */ ATTRIB(Blaster, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
@@ -44,6 +45,9 @@ CLASS(Blaster, Weapon)
 ENDCLASS(Blaster)
 REGISTER_WEAPON(BLASTER, blaster, NEW(Blaster));
 
+SPAWNFUNC_WEAPON(weapon_blaster, WEP_BLASTER)
+SPAWNFUNC_WEAPON(weapon_laser, WEP_BLASTER)
+
 #ifdef SVQC
 .float blaster_damage;
 .float blaster_edgedamage;
@@ -51,5 +55,4 @@ REGISTER_WEAPON(BLASTER, blaster, NEW(Blaster));
 .float blaster_force;
 .float blaster_lifetime;
 
-spawnfunc(weapon_blaster);
 #endif