//dprint("Heat: ",ftos(player.arc_heat_percent*100),"%\n");
}
-void W_Arc_Bolt_Explode()
-{SELFPARAM();
+void W_Arc_Bolt_Explode(entity this)
+{
self.event_damage = func_null;
RadiusDamage(self, self.realowner, WEP_CVAR(arc, bolt_damage), WEP_CVAR(arc, bolt_edgedamage), WEP_CVAR(arc, bolt_radius), world, world, WEP_CVAR(arc, bolt_force), self.projectiledeathtype, other);
void W_Arc_Bolt_Explode_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, W_Arc_Bolt_Explode());
+ WITHSELF(this, W_Arc_Bolt_Explode(this));
}
void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
this.angles = vectoangles(this.velocity);
if(this.health <= 0)
- W_PrepareExplosionByDamage(this, attacker, this.think);
+ W_PrepareExplosionByDamage(this, attacker, getthink(this));
}
-void W_Arc_Bolt_Touch()
-{SELFPARAM();
+void W_Arc_Bolt_Touch(entity this)
+{
PROJECTILE_TOUCH;
self.use(this, NULL, NULL);
}
-void W_Arc_Attack_Bolt(Weapon thiswep)
-{SELFPARAM();
+void W_Arc_Attack_Bolt(Weapon thiswep, entity actor)
+{
+ entity this = actor;
entity missile;
W_DecreaseAmmo(thiswep, self, WEP_CVAR(arc, bolt_ammo));
settouch(missile, W_Arc_Bolt_Touch);
missile.use = W_Arc_Bolt_Explode_use;
- missile.think = adaptor_think2use_hittype_splash;
+ setthink(missile, adaptor_think2use_hittype_splash);
missile.nextthink = time + WEP_CVAR(arc, bolt_lifetime);
PROJECTILE_MAKETRIGGER(missile);
missile.projectiledeathtype = WEP_ARC.m_id | HITTYPE_SECONDARY;
MUTATOR_CALLHOOK(EditProjectile, self, missile);
}
-void W_Arc_Beam_Think()
-{SELFPARAM();
+void W_Arc_Beam_Think(entity this)
+{
if(self != self.owner.arc_beam)
{
remove(self);
self.nextthink = time;
}
-void W_Arc_Beam(float burst)
-{SELFPARAM();
+void W_Arc_Beam(float burst, entity actor)
+{entity this = actor;
// only play fire sound if 1 sec has passed since player let go the fire button
if(time - self.beam_prev > 1)
entity beam = self.arc_beam = new(W_Arc_Beam);
beam.solid = SOLID_NOT;
- beam.think = W_Arc_Beam_Think;
+ setthink(beam, W_Arc_Beam_Think);
beam.owner = self;
beam.movetype = MOVETYPE_NONE;
beam.bot_dodge = true;
beam.beam_bursting = burst;
Net_LinkEntity(beam, false, 0, W_Arc_Beam_Send);
- WITHSELF(beam, beam.think());
+ WITHSELF(beam, getthink(beam)(beam));
}
-
-void Arc_Smoke()
-{SELFPARAM();
+void Arc_Smoke(entity actor)
+{entity this = actor;
makevectors(self.v_angle);
W_SetupShot_Range(self,true,0,SND_Null,0,0,0);
}
}
-METHOD(Arc, wr_aim, void(entity thiswep))
+METHOD(Arc, wr_aim, void(entity thiswep, entity actor))
{
- SELFPARAM();
+ entity this = actor;
if(WEP_CVAR(arc, beam_botaimspeed))
{
PHYS_INPUT_BUTTON_ATCK(self) = bot_aim(
METHOD(Arc, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
{
Arc_Player_SetHeat(actor);
- Arc_Smoke();
+ Arc_Smoke(actor);
bool beam_fire2 = ((fire & 2) && !WEP_CVAR(arc, bolt));
{
if(weapon_prepareattack(thiswep, actor, weaponentity, boolean(beam_fire2), 0))
{
- W_Arc_Beam(boolean(beam_fire2));
+ W_Arc_Beam(boolean(beam_fire2), actor);
if(!actor.arc_BUTTON_ATCK_prev)
{
{
if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(arc, bolt_refire)))
{
- W_Arc_Attack_Bolt(thiswep);
+ W_Arc_Attack_Bolt(thiswep, actor);
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR(arc, bolt_refire), w_ready);
}
}
else
return WEAPON_ARC_MURDER;
}
-METHOD(Arc, wr_drop, void(entity thiswep))
+METHOD(Arc, wr_drop, void(entity thiswep, entity actor))
{
- SELFPARAM();
+ entity this = actor;
weapon_dropevent_item.arc_overheat = self.arc_overheat;
weapon_dropevent_item.arc_cooldown = self.arc_cooldown;
self.arc_overheat = 0;
self.arc_cooldown = 0;
}
-METHOD(Arc, wr_pickup, void(entity thiswep))
+METHOD(Arc, wr_pickup, void(entity thiswep, entity actor))
{
- SELFPARAM();
+ entity this = actor;
if ( !client_hasweapon(self, thiswep, false, false) &&
weapon_dropevent_item.arc_overheat > time )
{
#ifdef CSQC
bool autocvar_cl_arcbeam_teamcolor = true;
-METHOD(Arc, wr_impacteffect, void(entity thiswep))
+METHOD(Arc, wr_impacteffect, void(entity thiswep, entity actor))
{
- SELFPARAM();
+ entity this = actor;
if(w_deathtype & HITTYPE_SECONDARY)
{
vector org2;