newproj.weaponentity_fld = this.weaponentity_fld;
settouch(newproj, func_null);
- newproj.death_time = this.death_time;
+ if(WEP_CVAR_SEC(electro, stick_lifetime) > 0){
+ newproj.death_time = time + WEP_CVAR_SEC(electro, stick_lifetime);
+ }else{
+ newproj.death_time = this.death_time;
+ }
newproj.use = this.use;
newproj.flags = this.flags;
IL_PUSH(g_projectiles, newproj);
spamsound(this, CH_SHOTS, SND_ELECTRO_BOUNCE, VOL_BASE, ATTEN_NORM);
this.projectiledeathtype |= HITTYPE_BOUNCE;
- if(WEP_CVAR_SEC(electro, stick))
- W_Electro_Orb_Stick(this, toucher);
+ if(WEP_CVAR_SEC(electro, stick)){
+ if(WEP_CVAR_SEC(electro, stick_lifetime) == 0){
+ W_Electro_Explode(this, toucher);
+ } else {
+ W_Electro_Orb_Stick(this, toucher);
+ }
+ }
}
}
if(time >= actor.(weaponentity).electro_secondarytime + WEP_CVAR_SEC(electro, refire2) * W_WeaponRateFactor(actor))
if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire)))
{
- W_Electro_Attack_Bolt(thiswep, actor, weaponentity);
- weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready);
+ W_Electro_Attack_Bolt(thiswep, actor, weaponentity);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready);
}
}
else if(fire & 2)
}
return ammo_amount;
}
-METHOD(Electro, wr_resetplayer, void(entity thiswep, entity actor))
-{
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
- {
- .entity weaponentity = weaponentities[slot];
- actor.(weaponentity).electro_secondarytime = time;
- }
-}
METHOD(Electro, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
{
W_Reload(actor, weaponentity, min(WEP_CVAR_PRI(electro, ammo), WEP_CVAR_SEC(electro, ammo)), SND_RELOAD);