X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Farc.qc;h=e2936bd9599eefbccf03ca58056368d245869d3b;hb=fd20a1f1eae2b2ba955ce9ddedc20cd151a6f362;hp=cf391b034a3e76807eab3187e41cb287e33f257b;hpb=a5357242d8541b890aa0f11e647669c7c3efb2df;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index cf391b034..e2936bd95 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -231,8 +231,8 @@ void Arc_Player_SetHeat(entity player) //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); @@ -241,7 +241,7 @@ void W_Arc_Bolt_Explode() 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) @@ -256,17 +256,18 @@ void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float dam 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)); @@ -286,9 +287,9 @@ void W_Arc_Attack_Bolt(Weapon thiswep) missile.event_damage = W_Arc_Bolt_Damage; missile.damagedbycontents = true; - missile.touch = W_Arc_Bolt_Touch; + 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; @@ -307,8 +308,8 @@ void W_Arc_Attack_Bolt(Weapon thiswep) 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); @@ -372,15 +373,14 @@ void W_Arc_Beam_Think() } if(self == self.owner.arc_beam) { self.owner.arc_beam = world; } - setself(self.owner); + entity own = self.owner; Weapon w = WEP_ARC; - if(!w.wr_checkammo1(w) && !w.wr_checkammo2(w)) - if(!(self.items & IT_UNLIMITED_WEAPON_AMMO)) + if(!w.wr_checkammo1(w, own) && !w.wr_checkammo2(w, own)) + if(!(own.items & IT_UNLIMITED_WEAPON_AMMO)) { // note: this doesn't force the switch - W_SwitchToOtherWeapon(self); + W_SwitchToOtherWeapon(own); } - setself(this); remove(self); return; } @@ -675,8 +675,8 @@ void W_Arc_Beam_Think() 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) @@ -684,7 +684,7 @@ void W_Arc_Beam(float burst) 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; @@ -692,11 +692,10 @@ void W_Arc_Beam(float burst) 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); @@ -731,9 +730,9 @@ void Arc_Smoke() } } -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( @@ -758,7 +757,7 @@ METHOD(Arc, wr_aim, void(entity thiswep)) 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)); @@ -780,7 +779,7 @@ METHOD(Arc, wr_think, void(entity thiswep, entity actor, .entity weaponentity, i { 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) { @@ -796,7 +795,7 @@ METHOD(Arc, wr_think, void(entity thiswep, entity actor, .entity weaponentity, i { 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); } } @@ -831,23 +830,21 @@ METHOD(Arc, wr_init, void(entity thiswep)) arc_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC.m_id), false, false, 4); } } -METHOD(Arc, wr_checkammo1, bool(entity thiswep)) +METHOD(Arc, wr_checkammo1, bool(entity thiswep, entity actor)) { - SELFPARAM(); - return ((!WEP_CVAR(arc, beam_ammo)) || (self.(thiswep.ammo_field) > 0)); + return ((!WEP_CVAR(arc, beam_ammo)) || (actor.(thiswep.ammo_field) > 0)); } -METHOD(Arc, wr_checkammo2, bool(entity thiswep)) +METHOD(Arc, wr_checkammo2, bool(entity thiswep, entity actor)) { - SELFPARAM(); if(WEP_CVAR(arc, bolt)) { - float ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(arc, bolt_ammo); - ammo_amount += self.(weapon_load[WEP_ARC.m_id]) >= WEP_CVAR(arc, bolt_ammo); + float ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR(arc, bolt_ammo); + ammo_amount += actor.(weapon_load[WEP_ARC.m_id]) >= WEP_CVAR(arc, bolt_ammo); return ammo_amount; } else return WEP_CVAR(arc, overheat_max) > 0 && - ((!WEP_CVAR(arc, burst_ammo)) || (self.(thiswep.ammo_field) > 0)); + ((!WEP_CVAR(arc, burst_ammo)) || (actor.(thiswep.ammo_field) > 0)); } METHOD(Arc, wr_killmessage, Notification(entity thiswep)) { @@ -856,17 +853,17 @@ METHOD(Arc, wr_killmessage, Notification(entity thiswep)) 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 ) { @@ -878,9 +875,9 @@ METHOD(Arc, wr_pickup, void(entity thiswep)) #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; @@ -1289,308 +1286,308 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew) { int gunalign = W_GetGunAlignment(world); - self.beam_shotorigin = arc_shotorigin[gunalign]; + this.beam_shotorigin = arc_shotorigin[gunalign]; // set other main attributes of the beam - self.draw = Draw_ArcBeam; - self.entremove = Remove_ArcBeam; - self.move_time = time; - loopsound(self, CH_SHOTS_SINGLE, SND(ARC_LOOP), VOL_BASE, ATTEN_NORM); + this.draw = Draw_ArcBeam; + this.entremove = Remove_ArcBeam; + this.move_time = time; + loopsound(this, CH_SHOTS_SINGLE, SND(ARC_LOOP), VOL_BASE, ATTEN_NORM); flash = spawn(); - flash.owner = self; + flash.owner = this; flash.effects = EF_ADDITIVE | EF_FULLBRIGHT; flash.drawmask = MASK_NORMAL; flash.solid = SOLID_NOT; flash.avelocity_z = 5000; - setattachment(flash, self, ""); + setattachment(flash, this, ""); setorigin(flash, '0 0 0'); - self.beam_muzzleentity = flash; + this.beam_muzzleentity = flash; } else { - flash = self.beam_muzzleentity; + flash = this.beam_muzzleentity; } if(sf & ARC_SF_SETTINGS) // settings information { - self.beam_degreespersegment = ReadShort(); - self.beam_distancepersegment = ReadShort(); - self.beam_maxangle = ReadShort(); - self.beam_range = ReadCoord(); - self.beam_returnspeed = ReadShort(); - self.beam_tightness = (ReadByte() / 10); + this.beam_degreespersegment = ReadShort(); + this.beam_distancepersegment = ReadShort(); + this.beam_maxangle = ReadShort(); + this.beam_range = ReadCoord(); + this.beam_returnspeed = ReadShort(); + this.beam_tightness = (ReadByte() / 10); if(ReadByte()) { if(autocvar_chase_active) - { self.beam_usevieworigin = 1; } + { this.beam_usevieworigin = 1; } else // use view origin - { self.beam_usevieworigin = 2; } + { this.beam_usevieworigin = 2; } } else { - self.beam_usevieworigin = 0; + this.beam_usevieworigin = 0; } - self.sv_entnum = ReadByte(); + this.sv_entnum = ReadByte(); } - if(!self.beam_usevieworigin) + if(!this.beam_usevieworigin) { - // self.iflags = IFLAG_ORIGIN | IFLAG_ANGLES | IFLAG_V_ANGLE; // why doesn't this work? - self.iflags = IFLAG_ORIGIN; + // this.iflags = IFLAG_ORIGIN | IFLAG_ANGLES | IFLAG_V_ANGLE; // why doesn't this work? + this.iflags = IFLAG_ORIGIN; - InterpolateOrigin_Undo(self); + InterpolateOrigin_Undo(this); } if(sf & ARC_SF_START) // starting location { - self.origin_x = ReadCoord(); - self.origin_y = ReadCoord(); - self.origin_z = ReadCoord(); + this.origin_x = ReadCoord(); + this.origin_y = ReadCoord(); + this.origin_z = ReadCoord(); } - else if(self.beam_usevieworigin) // infer the location from player location + else if(this.beam_usevieworigin) // infer the location from player location { - if(self.beam_usevieworigin == 2) + if(this.beam_usevieworigin == 2) { // use view origin - self.origin = view_origin; + this.origin = view_origin; } else { // use player origin so that third person display still works - self.origin = entcs_receiver(player_localnum).origin + ('0 0 1' * STAT(VIEWHEIGHT)); + this.origin = entcs_receiver(player_localnum).origin + ('0 0 1' * STAT(VIEWHEIGHT)); } } - setorigin(self, self.origin); + setorigin(this, this.origin); if(sf & ARC_SF_WANTDIR) // want/aim direction { - self.v_angle_x = ReadCoord(); - self.v_angle_y = ReadCoord(); - self.v_angle_z = ReadCoord(); + this.v_angle_x = ReadCoord(); + this.v_angle_y = ReadCoord(); + this.v_angle_z = ReadCoord(); } if(sf & ARC_SF_BEAMDIR) // beam direction { - self.angles_x = ReadCoord(); - self.angles_y = ReadCoord(); - self.angles_z = ReadCoord(); + this.angles_x = ReadCoord(); + this.angles_y = ReadCoord(); + this.angles_z = ReadCoord(); } if(sf & ARC_SF_BEAMTYPE) // beam type { - self.beam_type = ReadByte(); + this.beam_type = ReadByte(); - vector beamcolor = ((autocvar_cl_arcbeam_teamcolor) ? colormapPaletteColor(stof(getplayerkeyvalue(self.sv_entnum - 1, "colors")) & 0x0F, true) : '1 1 1'); - switch(self.beam_type) + vector beamcolor = ((autocvar_cl_arcbeam_teamcolor) ? colormapPaletteColor(stof(getplayerkeyvalue(this.sv_entnum - 1, "colors")) & 0x0F, true) : '1 1 1'); + switch(this.beam_type) { case ARC_BT_MISS: { - self.beam_color = beamcolor; - self.beam_alpha = 0.5; - self.beam_thickness = 8; - self.beam_traileffect = (EFFECT_ARC_BEAM); - self.beam_hiteffect = (EFFECT_ARC_LIGHTNING); - self.beam_hitlight[0] = 0; - self.beam_hitlight[1] = 1; - self.beam_hitlight[2] = 1; - self.beam_hitlight[3] = 1; - self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); - self.beam_muzzlelight[0] = 0; - self.beam_muzzlelight[1] = 1; - self.beam_muzzlelight[2] = 1; - self.beam_muzzlelight[3] = 1; - if(self.beam_muzzleeffect) + this.beam_color = beamcolor; + this.beam_alpha = 0.5; + this.beam_thickness = 8; + this.beam_traileffect = (EFFECT_ARC_BEAM); + this.beam_hiteffect = (EFFECT_ARC_LIGHTNING); + this.beam_hitlight[0] = 0; + this.beam_hitlight[1] = 1; + this.beam_hitlight[2] = 1; + this.beam_hitlight[3] = 1; + this.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); + this.beam_muzzlelight[0] = 0; + this.beam_muzzlelight[1] = 1; + this.beam_muzzlelight[2] = 1; + this.beam_muzzlelight[3] = 1; + if(this.beam_muzzleeffect) { setmodel(flash, MDL_ARC_MUZZLEFLASH); - flash.alpha = self.beam_alpha; - flash.colormod = self.beam_color; + flash.alpha = this.beam_alpha; + flash.colormod = this.beam_color; flash.scale = 0.5; } break; } case ARC_BT_WALL: // grenadelauncher_muzzleflash healray_muzzleflash { - self.beam_color = beamcolor; - self.beam_alpha = 0.5; - self.beam_thickness = 8; - self.beam_traileffect = (EFFECT_ARC_BEAM); - self.beam_hiteffect = (EFFECT_ARC_LIGHTNING); - self.beam_hitlight[0] = 0; - self.beam_hitlight[1] = 1; - self.beam_hitlight[2] = 1; - self.beam_hitlight[3] = 1; - self.beam_muzzleeffect = NULL; // (EFFECT_GRENADE_MUZZLEFLASH); - self.beam_muzzlelight[0] = 0; - self.beam_muzzlelight[1] = 1; - self.beam_muzzlelight[2] = 1; - self.beam_muzzlelight[3] = 1; - self.beam_image = "particles/lgbeam"; - if(self.beam_muzzleeffect) + this.beam_color = beamcolor; + this.beam_alpha = 0.5; + this.beam_thickness = 8; + this.beam_traileffect = (EFFECT_ARC_BEAM); + this.beam_hiteffect = (EFFECT_ARC_LIGHTNING); + this.beam_hitlight[0] = 0; + this.beam_hitlight[1] = 1; + this.beam_hitlight[2] = 1; + this.beam_hitlight[3] = 1; + this.beam_muzzleeffect = NULL; // (EFFECT_GRENADE_MUZZLEFLASH); + this.beam_muzzlelight[0] = 0; + this.beam_muzzlelight[1] = 1; + this.beam_muzzlelight[2] = 1; + this.beam_muzzlelight[3] = 1; + this.beam_image = "particles/lgbeam"; + if(this.beam_muzzleeffect) { setmodel(flash, MDL_ARC_MUZZLEFLASH); - flash.alpha = self.beam_alpha; - flash.colormod = self.beam_color; + flash.alpha = this.beam_alpha; + flash.colormod = this.beam_color; flash.scale = 0.5; } break; } case ARC_BT_HEAL: { - self.beam_color = beamcolor; - self.beam_alpha = 0.5; - self.beam_thickness = 8; - self.beam_traileffect = (EFFECT_ARC_BEAM_HEAL); - self.beam_hiteffect = (EFFECT_ARC_BEAM_HEAL_IMPACT); - self.beam_hitlight[0] = 0; - self.beam_hitlight[1] = 1; - self.beam_hitlight[2] = 1; - self.beam_hitlight[3] = 1; - self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); - self.beam_muzzlelight[0] = 0; - self.beam_muzzlelight[1] = 1; - self.beam_muzzlelight[2] = 1; - self.beam_muzzlelight[3] = 1; - self.beam_image = "particles/lgbeam"; - if(self.beam_muzzleeffect) + this.beam_color = beamcolor; + this.beam_alpha = 0.5; + this.beam_thickness = 8; + this.beam_traileffect = (EFFECT_ARC_BEAM_HEAL); + this.beam_hiteffect = (EFFECT_ARC_BEAM_HEAL_IMPACT); + this.beam_hitlight[0] = 0; + this.beam_hitlight[1] = 1; + this.beam_hitlight[2] = 1; + this.beam_hitlight[3] = 1; + this.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); + this.beam_muzzlelight[0] = 0; + this.beam_muzzlelight[1] = 1; + this.beam_muzzlelight[2] = 1; + this.beam_muzzlelight[3] = 1; + this.beam_image = "particles/lgbeam"; + if(this.beam_muzzleeffect) { setmodel(flash, MDL_ARC_MUZZLEFLASH); - flash.alpha = self.beam_alpha; - flash.colormod = self.beam_color; + flash.alpha = this.beam_alpha; + flash.colormod = this.beam_color; flash.scale = 0.5; } break; } case ARC_BT_HIT: { - self.beam_color = beamcolor; - self.beam_alpha = 0.5; - self.beam_thickness = 8; - self.beam_traileffect = (EFFECT_ARC_BEAM); - self.beam_hiteffect = (EFFECT_ARC_LIGHTNING); - self.beam_hitlight[0] = 20; - self.beam_hitlight[1] = 1; - self.beam_hitlight[2] = 0; - self.beam_hitlight[3] = 0; - self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); - self.beam_muzzlelight[0] = 50; - self.beam_muzzlelight[1] = 1; - self.beam_muzzlelight[2] = 0; - self.beam_muzzlelight[3] = 0; - self.beam_image = "particles/lgbeam"; - if(self.beam_muzzleeffect) + this.beam_color = beamcolor; + this.beam_alpha = 0.5; + this.beam_thickness = 8; + this.beam_traileffect = (EFFECT_ARC_BEAM); + this.beam_hiteffect = (EFFECT_ARC_LIGHTNING); + this.beam_hitlight[0] = 20; + this.beam_hitlight[1] = 1; + this.beam_hitlight[2] = 0; + this.beam_hitlight[3] = 0; + this.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); + this.beam_muzzlelight[0] = 50; + this.beam_muzzlelight[1] = 1; + this.beam_muzzlelight[2] = 0; + this.beam_muzzlelight[3] = 0; + this.beam_image = "particles/lgbeam"; + if(this.beam_muzzleeffect) { setmodel(flash, MDL_ARC_MUZZLEFLASH); - flash.alpha = self.beam_alpha; - flash.colormod = self.beam_color; + flash.alpha = this.beam_alpha; + flash.colormod = this.beam_color; flash.scale = 0.5; } break; } case ARC_BT_BURST_MISS: { - self.beam_color = beamcolor; - self.beam_alpha = 0.5; - self.beam_thickness = 14; - self.beam_traileffect = (EFFECT_ARC_BEAM); - self.beam_hiteffect = (EFFECT_ARC_LIGHTNING); - self.beam_hitlight[0] = 0; - self.beam_hitlight[1] = 1; - self.beam_hitlight[2] = 1; - self.beam_hitlight[3] = 1; - self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); - self.beam_muzzlelight[0] = 0; - self.beam_muzzlelight[1] = 1; - self.beam_muzzlelight[2] = 1; - self.beam_muzzlelight[3] = 1; - self.beam_image = "particles/lgbeam"; - if(self.beam_muzzleeffect) + this.beam_color = beamcolor; + this.beam_alpha = 0.5; + this.beam_thickness = 14; + this.beam_traileffect = (EFFECT_ARC_BEAM); + this.beam_hiteffect = (EFFECT_ARC_LIGHTNING); + this.beam_hitlight[0] = 0; + this.beam_hitlight[1] = 1; + this.beam_hitlight[2] = 1; + this.beam_hitlight[3] = 1; + this.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); + this.beam_muzzlelight[0] = 0; + this.beam_muzzlelight[1] = 1; + this.beam_muzzlelight[2] = 1; + this.beam_muzzlelight[3] = 1; + this.beam_image = "particles/lgbeam"; + if(this.beam_muzzleeffect) { setmodel(flash, MDL_ARC_MUZZLEFLASH); - flash.alpha = self.beam_alpha; - flash.colormod = self.beam_color; + flash.alpha = this.beam_alpha; + flash.colormod = this.beam_color; flash.scale = 0.5; } break; } case ARC_BT_BURST_WALL: { - self.beam_color = beamcolor; - self.beam_alpha = 0.5; - self.beam_thickness = 14; - self.beam_traileffect = (EFFECT_ARC_BEAM); - self.beam_hiteffect = (EFFECT_ARC_LIGHTNING); - self.beam_hitlight[0] = 0; - self.beam_hitlight[1] = 1; - self.beam_hitlight[2] = 1; - self.beam_hitlight[3] = 1; - self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); - self.beam_muzzlelight[0] = 0; - self.beam_muzzlelight[1] = 1; - self.beam_muzzlelight[2] = 1; - self.beam_muzzlelight[3] = 1; - self.beam_image = "particles/lgbeam"; - if(self.beam_muzzleeffect) + this.beam_color = beamcolor; + this.beam_alpha = 0.5; + this.beam_thickness = 14; + this.beam_traileffect = (EFFECT_ARC_BEAM); + this.beam_hiteffect = (EFFECT_ARC_LIGHTNING); + this.beam_hitlight[0] = 0; + this.beam_hitlight[1] = 1; + this.beam_hitlight[2] = 1; + this.beam_hitlight[3] = 1; + this.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); + this.beam_muzzlelight[0] = 0; + this.beam_muzzlelight[1] = 1; + this.beam_muzzlelight[2] = 1; + this.beam_muzzlelight[3] = 1; + this.beam_image = "particles/lgbeam"; + if(this.beam_muzzleeffect) { setmodel(flash, MDL_ARC_MUZZLEFLASH); - flash.alpha = self.beam_alpha; - flash.colormod = self.beam_color; + flash.alpha = this.beam_alpha; + flash.colormod = this.beam_color; flash.scale = 0.5; } break; } case ARC_BT_BURST_HEAL: { - self.beam_color = beamcolor; - self.beam_alpha = 0.5; - self.beam_thickness = 14; - self.beam_traileffect = (EFFECT_ARC_BEAM_HEAL); - self.beam_hiteffect = (EFFECT_ARC_BEAM_HEAL_IMPACT2); - self.beam_hitlight[0] = 0; - self.beam_hitlight[1] = 1; - self.beam_hitlight[2] = 1; - self.beam_hitlight[3] = 1; - self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); - self.beam_muzzlelight[0] = 0; - self.beam_muzzlelight[1] = 1; - self.beam_muzzlelight[2] = 1; - self.beam_muzzlelight[3] = 1; - self.beam_image = "particles/lgbeam"; - if(self.beam_muzzleeffect) + this.beam_color = beamcolor; + this.beam_alpha = 0.5; + this.beam_thickness = 14; + this.beam_traileffect = (EFFECT_ARC_BEAM_HEAL); + this.beam_hiteffect = (EFFECT_ARC_BEAM_HEAL_IMPACT2); + this.beam_hitlight[0] = 0; + this.beam_hitlight[1] = 1; + this.beam_hitlight[2] = 1; + this.beam_hitlight[3] = 1; + this.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); + this.beam_muzzlelight[0] = 0; + this.beam_muzzlelight[1] = 1; + this.beam_muzzlelight[2] = 1; + this.beam_muzzlelight[3] = 1; + this.beam_image = "particles/lgbeam"; + if(this.beam_muzzleeffect) { setmodel(flash, MDL_ARC_MUZZLEFLASH); - flash.alpha = self.beam_alpha; - flash.colormod = self.beam_color; + flash.alpha = this.beam_alpha; + flash.colormod = this.beam_color; flash.scale = 0.5; } break; } case ARC_BT_BURST_HIT: { - self.beam_color = beamcolor; - self.beam_alpha = 0.5; - self.beam_thickness = 14; - self.beam_traileffect = (EFFECT_ARC_BEAM); - self.beam_hiteffect = (EFFECT_ARC_LIGHTNING); - self.beam_hitlight[0] = 0; - self.beam_hitlight[1] = 1; - self.beam_hitlight[2] = 1; - self.beam_hitlight[3] = 1; - self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); - self.beam_muzzlelight[0] = 0; - self.beam_muzzlelight[1] = 1; - self.beam_muzzlelight[2] = 1; - self.beam_muzzlelight[3] = 1; - self.beam_image = "particles/lgbeam"; - if(self.beam_muzzleeffect) + this.beam_color = beamcolor; + this.beam_alpha = 0.5; + this.beam_thickness = 14; + this.beam_traileffect = (EFFECT_ARC_BEAM); + this.beam_hiteffect = (EFFECT_ARC_LIGHTNING); + this.beam_hitlight[0] = 0; + this.beam_hitlight[1] = 1; + this.beam_hitlight[2] = 1; + this.beam_hitlight[3] = 1; + this.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); + this.beam_muzzlelight[0] = 0; + this.beam_muzzlelight[1] = 1; + this.beam_muzzlelight[2] = 1; + this.beam_muzzlelight[3] = 1; + this.beam_image = "particles/lgbeam"; + if(this.beam_muzzleeffect) { setmodel(flash, MDL_ARC_MUZZLEFLASH); - flash.alpha = self.beam_alpha; - flash.colormod = self.beam_color; + flash.alpha = this.beam_alpha; + flash.colormod = this.beam_color; flash.scale = 0.5; } break; @@ -1599,26 +1596,26 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew) // shouldn't be possible, but lets make it colorful if it does :D default: { - self.beam_color = randomvec(); - self.beam_alpha = 1; - self.beam_thickness = 8; - self.beam_traileffect = NULL; - self.beam_hiteffect = NULL; - self.beam_hitlight[0] = 0; - self.beam_hitlight[1] = 1; - self.beam_hitlight[2] = 1; - self.beam_hitlight[3] = 1; - self.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); - self.beam_muzzlelight[0] = 0; - self.beam_muzzlelight[1] = 1; - self.beam_muzzlelight[2] = 1; - self.beam_muzzlelight[3] = 1; - self.beam_image = "particles/lgbeam"; - if(self.beam_muzzleeffect) + this.beam_color = randomvec(); + this.beam_alpha = 1; + this.beam_thickness = 8; + this.beam_traileffect = NULL; + this.beam_hiteffect = NULL; + this.beam_hitlight[0] = 0; + this.beam_hitlight[1] = 1; + this.beam_hitlight[2] = 1; + this.beam_hitlight[3] = 1; + this.beam_muzzleeffect = NULL; //(EFFECT_VORTEX_MUZZLEFLASH); + this.beam_muzzlelight[0] = 0; + this.beam_muzzlelight[1] = 1; + this.beam_muzzlelight[2] = 1; + this.beam_muzzlelight[3] = 1; + this.beam_image = "particles/lgbeam"; + if(this.beam_muzzleeffect) { setmodel(flash, MDL_ARC_MUZZLEFLASH); - flash.alpha = self.beam_alpha; - flash.colormod = self.beam_color; + flash.alpha = this.beam_alpha; + flash.colormod = this.beam_color; flash.scale = 0.5; } break; @@ -1626,7 +1623,7 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew) } } - if(!self.beam_usevieworigin) + if(!this.beam_usevieworigin) { InterpolateOrigin_Note(this); }