-#ifdef REGISTER_WEAPON
+#ifndef IMPLEMENTATION
REGISTER_WEAPON(
/* WEP_##id */ CRYLINK,
/* function */ W_Crylink,
.entity queuenext;
.entity queueprev;
#endif
-#else
+#endif
+#ifdef IMPLEMENTATION
#ifdef SVQC
-void spawnfunc_weapon_crylink(void) { weapon_defaultspawnfunc(WEP_CRYLINK); }
+void spawnfunc_weapon_crylink(void) { weapon_defaultspawnfunc(WEP_CRYLINK.m_id); }
void W_Crylink_CheckLinks(entity e)
{
e.projectiledeathtype,
other
);
- pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
+ Send_Effect("crylink_joinexplode", self.origin, '0 0 0', n);
}
}
}
up = v_up;
shots = WEP_CVAR_PRI(crylink, shots);
- pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
+ Send_Effect("crylink_muzzleflash", w_shotorg, w_shotdir * 1000, shots);
proj = prevproj = firstproj = world;
for(counter = 0; counter < shots; ++counter)
{
proj.movetype = MOVETYPE_BOUNCEMISSILE;
PROJECTILE_MAKETRIGGER(proj);
- proj.projectiledeathtype = WEP_CRYLINK;
+ proj.projectiledeathtype = WEP_CRYLINK.m_id;
//proj.gravity = 0.001;
setorigin(proj, w_shotorg);
up = v_up;
shots = WEP_CVAR_SEC(crylink, shots);
- pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
+ Send_Effect("crylink_muzzleflash", w_shotorg, w_shotdir * 1000, shots);
proj = prevproj = firstproj = world;
for(counter = 0; counter < shots; ++counter)
{
proj.movetype = MOVETYPE_BOUNCEMISSILE;
PROJECTILE_MAKETRIGGER(proj);
- proj.projectiledeathtype = WEP_CRYLINK | HITTYPE_SECONDARY;
+ proj.projectiledeathtype = WEP_CRYLINK.m_id | HITTYPE_SECONDARY;
//proj.gravity = 0.001;
setorigin(proj, w_shotorg);
if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
{
// ran out of ammo!
- self.cnt = WEP_CRYLINK;
+ self.cnt = WEP_CRYLINK.m_id;
self.switchweapon = w_getbestweapon(self);
}
}
return true;
ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_PRI(crylink, ammo);
- ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_PRI(crylink, ammo);
+ ammo_amount += self.(weapon_load[WEP_CRYLINK.m_id]) >= WEP_CVAR_PRI(crylink, ammo);
return ammo_amount;
}
case WR_CHECKAMMO2:
return true;
ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_SEC(crylink, ammo);
- ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_SEC(crylink, ammo);
+ ammo_amount += self.(weapon_load[WEP_CRYLINK.m_id]) >= WEP_CVAR_SEC(crylink, ammo);
return ammo_amount;
}
case WR_CONFIG: