-#ifdef REGISTER_WEAPON
+#ifndef IMPLEMENTATION
REGISTER_WEAPON(
/* WEP_##id */ CRYLINK,
/* function */ W_Crylink,
/* color */ '1 0.5 1',
/* modelname */ "crylink",
/* simplemdl */ "foobar",
-/* crosshair */ "gfx/crosshaircrylink 0.4",
+/* crosshair */ "gfx/crosshaircrylink 0.5",
/* wepimg */ "weaponcrylink",
/* refname */ "crylink",
/* wepname */ _("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);
CSQCProjectile(proj, true, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), true);
- other = proj; MUTATOR_CALLHOOK(EditProjectile);
+ MUTATOR_CALLHOOK(EditProjectile, self, proj);
}
if(WEP_CVAR_PRI(crylink, joinspread) != 0)
{
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);
CSQCProjectile(proj, true, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), true);
- other = proj; MUTATOR_CALLHOOK(EditProjectile);
+ MUTATOR_CALLHOOK(EditProjectile, self, proj);
}
if(WEP_CVAR_SEC(crylink, joinspread) != 0)
{
}
}
-float W_Crylink(float req)
+bool W_Crylink(int req)
{
float ammo_amount;
switch(req)
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:
}
#endif
#ifdef CSQC
-float W_Crylink(float req)
+bool W_Crylink(int req)
{
switch(req)
{