W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
}
-void W_Crylink_Reset(void)
+void W_Crylink_Reset()
{SELFPARAM();
W_Crylink_Dequeue(self);
remove(self);
return targ_origin;
}
-void W_Crylink_LinkJoinEffect_Think(void)
+void W_Crylink_LinkJoinEffect_Think()
{SELFPARAM();
// is there at least 2 projectiles very close?
entity e, p;
}
// NO bounce protection, as bounces are limited!
-void W_Crylink_Touch(void)
+void W_Crylink_Touch()
{SELFPARAM();
float finalhit;
float f;
// CSQCProjectile(proj, true, PROJECTILE_CRYLINK, true);
}
-void W_Crylink_Fadethink(void)
+void W_Crylink_Fadethink()
{SELFPARAM();
W_Crylink_Dequeue(self);
remove(self);
proj = prevproj = firstproj = world;
for(counter = 0; counter < shots; ++counter)
{
- proj = spawn();
+ proj = new(spike);
proj.reset = W_Crylink_Reset;
proj.realowner = proj.owner = self;
- proj.classname = "spike";
proj.bot_dodge = true;
proj.bot_dodgerating = WEP_CVAR_PRI(crylink, damage);
if(shots == 1) {
proj = prevproj = firstproj = world;
for(counter = 0; counter < shots; ++counter)
{
- proj = spawn();
+ proj = new(spike);
proj.reset = W_Crylink_Reset;
proj.realowner = proj.owner = self;
- proj.classname = "spike";
proj.bot_dodge = true;
proj.bot_dodgerating = WEP_CVAR_SEC(crylink, damage);
if(shots == 1) {
else
self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), false);
}
- METHOD(Crylink, wr_think, void(entity thiswep, entity actor, int slot, int fire))
+ METHOD(Crylink, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
{
if(autocvar_g_balance_crylink_reload_ammo && actor.clip_load < min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo))) { // forced reload
Weapon w = get_weaponinfo(actor.weapon);
if(fire & 1)
{
if(actor.crylink_waitrelease != 1)
- if(weapon_prepareattack(thiswep, actor, slot, false, WEP_CVAR_PRI(crylink, refire)))
+ if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(crylink, refire)))
{
W_Crylink_Attack(thiswep);
- weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(crylink, animtime), w_ready);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(crylink, animtime), w_ready);
}
}
if((fire & 2) && autocvar_g_balance_crylink_secondary)
{
if(actor.crylink_waitrelease != 2)
- if(weapon_prepareattack(thiswep, actor, slot, true, WEP_CVAR_SEC(crylink, refire)))
+ if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(crylink, refire)))
{
W_Crylink_Attack2(thiswep);
- weapon_thinkf(actor, slot, WFRAME_FIRE2, WEP_CVAR_SEC(crylink, animtime), w_ready);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(crylink, animtime), w_ready);
}
}
pos = W_Crylink_LinkJoin(actor.crylink_lastgroup, WEP_CVAR_BOTH(crylink, isprimary, joinspread) * WEP_CVAR_BOTH(crylink, isprimary, speed));
- linkjoineffect = spawn();
+ linkjoineffect = new(linkjoineffect);
linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
- linkjoineffect.classname = "linkjoineffect";
linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
linkjoineffect.owner = actor;
setorigin(linkjoineffect, pos);