/* crosshair */ ATTRIB(Vortex, w_crosshair_size, float, 0.65);
/* wepimg */ ATTRIB(Vortex, model2, string, "weaponnex");
/* refname */ ATTRIB(Vortex, netname, string, "vortex");
-/* wepname */ ATTRIB(Vortex, message, string, _("Vortex"));
+/* wepname */ ATTRIB(Vortex, m_name, string, _("Vortex"));
ENDCLASS(Vortex)
REGISTER_WEAPON(VORTEX, NEW(Vortex));
self.BUTTON_ATCK2 = true;
}
}
- METHOD(Vortex, wr_think, void(entity thiswep, entity actor, bool fire1, bool fire2))
+ METHOD(Vortex, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
{
if(WEP_CVAR(vortex, charge) && actor.vortex_charge < WEP_CVAR(vortex, charge_limit))
actor.vortex_charge = min(1, actor.vortex_charge + WEP_CVAR(vortex, charge_rate) * frametime / W_TICSPERFRAME);
w.wr_reload(w);
} else
{
- if(fire1)
+ if(fire & 1)
{
- if(weapon_prepareattack(thiswep, actor, false, WEP_CVAR_PRI(vortex, refire)))
+ if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(vortex, refire)))
{
W_Vortex_Attack(thiswep, 0);
- weapon_thinkf(actor, WFRAME_FIRE1, WEP_CVAR_PRI(vortex, animtime), w_ready);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(vortex, animtime), w_ready);
}
}
- if((WEP_CVAR(vortex, charge) && !WEP_CVAR(vortex, secondary)) ? (actor.BUTTON_ZOOM | actor.BUTTON_ZOOMSCRIPT) : fire2)
+ if((WEP_CVAR(vortex, charge) && !WEP_CVAR(vortex, secondary)) ? (actor.BUTTON_ZOOM | actor.BUTTON_ZOOMSCRIPT) : (fire & 2))
{
if(WEP_CVAR(vortex, charge))
{
else if(WEP_CVAR_SEC(vortex, ammo))
{
- if(fire2) // only eat ammo when the button is pressed
+ if(fire & 2) // only eat ammo when the button is pressed
{
dt = min(dt, (1 - actor.vortex_charge) / WEP_CVAR(vortex, charge_rate));
if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
}
else if(WEP_CVAR(vortex, secondary))
{
- if(weapon_prepareattack(thiswep, actor, false, WEP_CVAR_SEC(vortex, refire)))
+ if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_SEC(vortex, refire)))
{
W_Vortex_Attack(thiswep, 1);
- weapon_thinkf(actor, WFRAME_FIRE1, WEP_CVAR_SEC(vortex, animtime), w_ready);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_SEC(vortex, animtime), w_ready);
}
}
}
}
METHOD(Vortex, wr_resetplayer, void(entity thiswep))
{
+ if (WEP_CVAR(vortex, charge)) {
+ if (WEP_CVAR_SEC(vortex, chargepool)) {
+ self.vortex_chargepool_ammo = 1;
+ }
+ self.vortex_charge = WEP_CVAR(vortex, charge_start);
+ }
self.vortex_lasthit = 0;
}
METHOD(Vortex, wr_reload, void(entity thiswep))
METHOD(Vortex, wr_impacteffect, void(entity thiswep))
{
vector org2 = w_org + w_backoff * 6;
- pointparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), org2, '0 0 0', 1);
+ pointparticles(EFFECT_VORTEX_IMPACT, org2, '0 0 0', 1);
if(!w_issilent)
sound(self, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM);
}