+#include "arc.qh"
#ifndef IMPLEMENTATION
CLASS(Arc, Weapon)
-/* ammotype */ ATTRIB(Arc, ammo_field, .int, ammo_cells)
-/* impulse */ ATTRIB(Arc, impulse, int, 3)
+/* 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);
/* color */ ATTRIB(Arc, wpcolor, vector, '1 1 1');
/* modelname */ ATTRIB(Arc, mdl, string, "arc");
-#ifndef MENUQC
+#ifdef GAMEQC
/* model */ ATTRIB(Arc, m_model, Model, MDL_ARC_ITEM);
#endif
/* crosshair */ ATTRIB(Arc, w_crosshair, string, "gfx/crosshairhlac");
REGISTER_WEAPON(ARC, arc, NEW(Arc));
-#ifndef MENUQC
+#ifdef GAMEQC
const float ARC_MAX_SEGMENTS = 20;
vector arc_shotorigin[4];
.vector beam_start;
missile = new(missile);
missile.owner = missile.realowner = actor;
missile.bot_dodge = true;
+ IL_PUSH(g_bot_dodge, missile);
missile.bot_dodgerating = WEP_CVAR(arc, bolt_damage);
missile.takedamage = DAMAGE_YES;
||
forbidWeaponUse(this.owner)
||
+ PS(this.owner).m_switchweapon != WEP_ARC
+ ||
(!PHYS_INPUT_BUTTON_ATCK(this.owner) && !burst )
||
this.owner.vehicle
beam.owner = actor;
set_movetype(beam, MOVETYPE_NONE);
beam.bot_dodge = true;
+ IL_PUSH(g_bot_dodge, beam);
beam.bot_dodgerating = WEP_CVAR(arc, beam_damage);
beam.beam_bursting = burst;
Net_LinkEntity(beam, false, 0, W_Arc_Beam_Send);
for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
actor.arc_BUTTON_ATCK_prev[slot] = false;
}
-METHOD(Arc, wr_playerdeath, void(entity thiswep, entity actor))
+METHOD(Arc, wr_playerdeath, void(entity thiswep, entity actor, .entity weaponentity))
{
actor.arc_overheat = 0;
actor.arc_cooldown = 0;
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
- actor.arc_BUTTON_ATCK_prev[slot] = false;
+ int slot = weaponslot(weaponentity);
+ actor.arc_BUTTON_ATCK_prev[slot] = false;
}
#endif
#ifdef CSQC
{
this.beam_type = ReadByte();
- vector beamcolor = ((autocvar_cl_arcbeam_teamcolor) ? colormapPaletteColor(stof(getplayerkeyvalue(this.sv_entnum - 1, "colors")) & 0x0F, true) : '1 1 1');
+ vector beamcolor = ((autocvar_cl_arcbeam_teamcolor) ? colormapPaletteColor(entcs_GetClientColors(this.sv_entnum - 1) & 0x0F, true) : '1 1 1');
switch(this.beam_type)
{
case ARC_BT_MISS: