X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Farc.qc;h=4c9415305ab64b5fa68b765df55ca547ed734c3f;hb=aa18a5758615f24b007e9f35b68cc61b5aa0e50f;hp=c0d85831ae730be7dc9c9981d9f8b86150286bc5;hpb=cf7d70cea2066703aad74fce5931e635471904f3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index c0d85831a..4c9415305 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -1,3 +1,4 @@ +#include "arc.qh" #ifndef IMPLEMENTATION CLASS(Arc, Weapon) /* ammotype */ ATTRIB(Arc, ammo_field, .int, ammo_cells); @@ -6,7 +7,7 @@ CLASS(Arc, Weapon) /* 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"); @@ -74,7 +75,7 @@ ENDCLASS(Arc) REGISTER_WEAPON(ARC, arc, NEW(Arc)); -#ifndef MENUQC +#ifdef GAMEQC const float ARC_MAX_SEGMENTS = 20; vector arc_shotorigin[4]; .vector beam_start; @@ -281,6 +282,7 @@ void W_Arc_Attack_Bolt(Weapon thiswep, entity actor, .entity weaponentity) 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; @@ -288,6 +290,7 @@ void W_Arc_Attack_Bolt(Weapon thiswep, entity actor, .entity weaponentity) missile.damageforcescale = WEP_CVAR(arc, bolt_damageforcescale); missile.event_damage = W_Arc_Bolt_Damage; missile.damagedbycontents = true; + IL_PUSH(g_damagedbycontents, missile); settouch(missile, W_Arc_Bolt_Touch); missile.use = W_Arc_Bolt_Explode_use; @@ -338,6 +341,8 @@ void W_Arc_Beam_Think(entity this) || forbidWeaponUse(this.owner) || + PS(this.owner).m_switchweapon != WEP_ARC + || (!PHYS_INPUT_BUTTON_ATCK(this.owner) && !burst ) || this.owner.vehicle @@ -690,6 +695,7 @@ void W_Arc_Beam(float burst, entity actor, .entity weaponentity) 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); @@ -1397,7 +1403,7 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew) { 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: