/* ammotype */ ATTRIB(Arc, ammo_field, .int, ammo_cells);
/* impulse */ ATTRIB(Arc, impulse, int, 3);
/* flags */ ATTRIB(Arc, spawnflags, int, WEP_FLAG_NORMAL);
/* ammotype */ ATTRIB(Arc, ammo_field, .int, ammo_cells);
/* impulse */ ATTRIB(Arc, impulse, int, 3);
/* flags */ ATTRIB(Arc, spawnflags, int, WEP_FLAG_NORMAL);
-/* rating */ ATTRIB(Arc, bot_pickupbasevalue, float, BOT_PICKUP_RATING_HIGH);
+/* rating */ ATTRIB(Arc, bot_pickupbasevalue, float, 8000);
/* color */ ATTRIB(Arc, wpcolor, vector, '1 1 1');
/* modelname */ ATTRIB(Arc, mdl, string, "arc");
#ifdef GAMEQC
/* color */ ATTRIB(Arc, wpcolor, vector, '1 1 1');
/* modelname */ ATTRIB(Arc, mdl, string, "arc");
#ifdef GAMEQC
missile.damageforcescale = WEP_CVAR(arc, bolt_damageforcescale);
missile.event_damage = W_Arc_Bolt_Damage;
missile.damagedbycontents = true;
missile.damageforcescale = WEP_CVAR(arc, bolt_damageforcescale);
missile.event_damage = W_Arc_Bolt_Damage;
missile.damagedbycontents = true;
settouch(missile, W_Arc_Bolt_Touch);
missile.use = W_Arc_Bolt_Explode_use;
settouch(missile, W_Arc_Bolt_Touch);
missile.use = W_Arc_Bolt_Explode_use;
if ( cooldown_speed )
{
if ( WEP_CVAR(arc, cooldown_release) || (WEP_CVAR(arc, overheat_max) > 0 && this.beam_heat >= WEP_CVAR(arc, overheat_max)) )
if ( cooldown_speed )
{
if ( WEP_CVAR(arc, cooldown_release) || (WEP_CVAR(arc, overheat_max) > 0 && this.beam_heat >= WEP_CVAR(arc, overheat_max)) )
- this.owner.arc_overheat = time + this.beam_heat / cooldown_speed;
- this.owner.arc_cooldown = cooldown_speed;
+ own.arc_overheat = time + this.beam_heat / cooldown_speed;
+ own.arc_cooldown = cooldown_speed;
- if(this == this.owner.(weaponentity).arc_beam) { this.owner.(weaponentity).arc_beam = NULL; }
- entity own = this.owner;
- Weapon w = WEP_ARC;
- if(!w.wr_checkammo1(w, own, weaponentity) && !w.wr_checkammo2(w, own, weaponentity))
- if(!(own.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(this == own.(weaponentity).arc_beam) { own.(weaponentity).arc_beam = NULL; }
+ if(!thiswep.wr_checkammo1(thiswep, own, weaponentity) && !(own.items & IT_UNLIMITED_WEAPON_AMMO))
{
// note: this doesn't force the switch
W_SwitchToOtherWeapon(own, weaponentity);
{
// note: this doesn't force the switch
W_SwitchToOtherWeapon(own, weaponentity);
- coefficient = min(coefficient, this.owner.(thiswep.ammo_field) / rootammo);
- this.owner.(thiswep.ammo_field) = max(0, this.owner.(thiswep.ammo_field) - (rootammo * frametime));
+ coefficient = min(coefficient, own.(thiswep.ammo_field) / rootammo);
+ own.(thiswep.ammo_field) = max(0, own.(thiswep.ammo_field) - (rootammo * frametime));
}
}
float heat_speed = burst ? WEP_CVAR(arc, burst_heat) : WEP_CVAR(arc, beam_heat);
this.beam_heat = min( WEP_CVAR(arc, overheat_max), this.beam_heat + heat_speed*frametime );
}
}
float heat_speed = burst ? WEP_CVAR(arc, burst_heat) : WEP_CVAR(arc, beam_heat);
this.beam_heat = min( WEP_CVAR(arc, overheat_max), this.beam_heat + heat_speed*frametime );
-METHOD(Arc, wr_aim, void(entity thiswep, entity actor))
+METHOD(Arc, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
{
if(WEP_CVAR(arc, beam_botaimspeed))
{
PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(
actor,
{
if(WEP_CVAR(arc, beam_botaimspeed))
{
PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(
actor,
WEP_CVAR(arc, beam_botaimspeed),
0,
WEP_CVAR(arc, beam_botaimlifetime),
WEP_CVAR(arc, beam_botaimspeed),
0,
WEP_CVAR(arc, beam_botaimlifetime),
Arc_Smoke(actor, weaponentity);
bool beam_fire2 = ((fire & 2) && !WEP_CVAR(arc, bolt));
Arc_Smoke(actor, weaponentity);
bool beam_fire2 = ((fire & 2) && !WEP_CVAR(arc, bolt));
if (time >= actor.arc_overheat)
if ((fire & 1) || beam_fire2 || actor.(weaponentity).arc_beam.beam_bursting)
{
if (time >= actor.arc_overheat)
if ((fire & 1) || beam_fire2 || actor.(weaponentity).arc_beam.beam_bursting)
{
{
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR(arc, beam_animtime), w_ready);
{
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR(arc, beam_animtime), w_ready);
sound(actor, CH_WEAPON_A, SND_ARC_STOP, VOL_BASE, ATTN_NORM);
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR(arc, beam_animtime), w_ready);
ATTACK_FINISHED(actor, slot) = time + WEP_CVAR(arc, beam_refire) * W_WeaponRateFactor(actor);
}
sound(actor, CH_WEAPON_A, SND_ARC_STOP, VOL_BASE, ATTN_NORM);
weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR(arc, beam_animtime), w_ready);
ATTACK_FINISHED(actor, slot) = time + WEP_CVAR(arc, beam_refire) * W_WeaponRateFactor(actor);
}
}
METHOD(Arc, wr_pickup, void(entity thiswep, entity actor, .entity weaponentity))
{
}
METHOD(Arc, wr_pickup, void(entity thiswep, entity actor, .entity weaponentity))
{
}
METHOD(Arc, wr_playerdeath, void(entity thiswep, entity actor, .entity weaponentity))
{
actor.arc_overheat = 0;
actor.arc_cooldown = 0;
}
METHOD(Arc, wr_playerdeath, void(entity thiswep, entity actor, .entity weaponentity))
{
actor.arc_overheat = 0;
actor.arc_cooldown = 0;
- this.beam_shotorigin = arc_shotorigin[gunalign]; // quick
- for(int j = 1; j < 5; ++j)
- {
- if(gunaligns[j] == viewmodels[slot])
- {
- this.beam_shotorigin = arc_shotorigin[j - 1]; // accurate
- break;
- }
- }
+ this.beam_shotorigin = arc_shotorigin[gunalign];