#endif
/* crosshair */ ATTRIB(Vaporizer, w_crosshair, string, "gfx/crosshairminstanex");
/* crosshair */ ATTRIB(Vaporizer, w_crosshair_size, float, 0.6);
+/* reticle */ ATTRIB(Vaporizer, w_reticle, string, "gfx/reticle_nex");
/* wepimg */ ATTRIB(Vaporizer, model2, string, "weaponminstanex");
/* refname */ ATTRIB(Vaporizer, netname, string, "vaporizer");
/* wepname */ ATTRIB(Vaporizer, m_name, string, _("Vaporizer"));
}
}
-METHOD(Vaporizer, wr_aim, void(entity thiswep, entity actor))
+METHOD(Vaporizer, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
{
if(actor.(thiswep.ammo_field) > 0)
PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, 1000000, 0, 1, false);
{
float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
// if the laser uses load, we also consider its ammo for reloading
- if(WEP_CVAR(vaporizer, reload_ammo) && WEP_CVAR_SEC(vaporizer, ammo) && actor.clip_load < min(vaporizer_ammo, WEP_CVAR_SEC(vaporizer, ammo))) { // forced reload
+ if(WEP_CVAR(vaporizer, reload_ammo) && WEP_CVAR_SEC(vaporizer, ammo) && actor.(weaponentity).clip_load < min(vaporizer_ammo, WEP_CVAR_SEC(vaporizer, ammo))) { // forced reload
thiswep.wr_reload(thiswep, actor, weaponentity);
- } else if(WEP_CVAR(vaporizer, reload_ammo) && actor.clip_load < vaporizer_ammo) { // forced reload
+ } else if(WEP_CVAR(vaporizer, reload_ammo) && actor.(weaponentity).clip_load < vaporizer_ammo) { // forced reload
thiswep.wr_reload(thiswep, actor, weaponentity);
}
if((fire & 1) && (actor.ammo_cells || !autocvar_g_rm) && !forbidWeaponUse(actor))
if((autocvar_g_rm && autocvar_g_rm_laser) || autocvar_g_rm_laser == 2)
{
bool rapid = autocvar_g_rm_laser_rapid;
- if(actor.jump_interval <= time && !actor.held_down)
+ if(actor.(weaponentity).jump_interval <= time && !actor.(weaponentity).held_down)
{
if(rapid)
- actor.held_down = true;
- actor.jump_interval = time + autocvar_g_rm_laser_refire;
- actor.jump_interval2 = time + autocvar_g_rm_laser_rapid_delay;
+ actor.(weaponentity).held_down = true;
+ actor.(weaponentity).jump_interval = time + autocvar_g_rm_laser_refire;
+ actor.(weaponentity).jump_interval2 = time + autocvar_g_rm_laser_rapid_delay;
damage_goodhits = 0;
W_RocketMinsta_Attack2(actor, weaponentity);
}
- else if(rapid && actor.jump_interval2 <= time && actor.held_down)
+ else if(rapid && actor.(weaponentity).jump_interval2 <= time && actor.(weaponentity).held_down)
{
- actor.jump_interval2 = time + autocvar_g_rm_laser_rapid_refire;
+ actor.(weaponentity).jump_interval2 = time + autocvar_g_rm_laser_rapid_refire;
damage_goodhits = 0;
W_RocketMinsta_Attack3(actor, weaponentity);
//weapon_thinkf(actor, WFRAME_FIRE2, autocvar_g_rm_laser_rapid_animtime, w_ready);
}
}
- else if (actor.jump_interval <= time)
+ else if (actor.(weaponentity).jump_interval <= time)
{
// handle refire manually, so that primary and secondary can be fired without conflictions (important for instagib)
- actor.jump_interval = time + WEP_CVAR_SEC(vaporizer, refire) * W_WeaponRateFactor(actor);
+ actor.(weaponentity).jump_interval = time + WEP_CVAR_SEC(vaporizer, refire) * W_WeaponRateFactor(actor);
// decrease ammo for the laser?
if(WEP_CVAR_SEC(vaporizer, ammo))
}
}
else
- actor.held_down = false;
+ actor.(weaponentity).held_down = false;
}
-METHOD(Vaporizer, wr_setup, void(entity thiswep, entity actor))
+METHOD(Vaporizer, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
{
- actor.ammo_field = (thiswep.ammo_field);
actor.vaporizer_lasthit = 0;
}
-METHOD(Vaporizer, wr_checkammo1, bool(entity thiswep, entity actor))
+METHOD(Vaporizer, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
{
float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
float ammo_amount = actor.(thiswep.ammo_field) >= vaporizer_ammo;
- ammo_amount += actor.(weapon_load[WEP_VAPORIZER.m_id]) >= vaporizer_ammo;
+ ammo_amount += actor.(weaponentity).(weapon_load[WEP_VAPORIZER.m_id]) >= vaporizer_ammo;
return ammo_amount;
}
-METHOD(Vaporizer, wr_checkammo2, bool(entity thiswep, entity actor))
+METHOD(Vaporizer, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
{
if(!WEP_CVAR_SEC(vaporizer, ammo))
return true;
float ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR_SEC(vaporizer, ammo);
- ammo_amount += actor.(weapon_load[WEP_VAPORIZER.m_id]) >= WEP_CVAR_SEC(vaporizer, ammo);
+ ammo_amount += actor.(weaponentity).(weapon_load[WEP_VAPORIZER.m_id]) >= WEP_CVAR_SEC(vaporizer, ammo);
return ammo_amount;
}
METHOD(Vaporizer, wr_resetplayer, void(entity thiswep, entity actor))
precache_pic("gfx/reticle_nex");
}
}
-METHOD(Vaporizer, wr_zoomreticle, bool(entity thiswep))
+METHOD(Vaporizer, wr_zoom, bool(entity thiswep, entity actor))
{
if(button_zoom || zoomscript_caught)
{
- reticle_image = "gfx/reticle_nex";
return true;
}
else