From 55d631bc5613cf1c852ee8bec01ac84b1c3dc3b1 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Thu, 27 Feb 2014 20:25:56 -0500 Subject: [PATCH] Working on muzzleflash, cleanup a bit --- qcsrc/common/weapons/w_arc.qc | 3 ++- qcsrc/common/weapons/w_electro.qc | 22 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index d06bf3202..93d9869fe 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -922,7 +922,7 @@ void Draw_ArcBeam(void) } setorigin(self, start_pos); - self.beam_muzzleentity.angles_z = random() * 360; // WEAPONTODO: use avelocity instead? + //self.beam_muzzleentity.angles_z = random() * 360; // WEAPONTODO: use avelocity instead? vector beam_endpos_estimate = (start_pos + (beamdir * self.beam_range)); @@ -1082,6 +1082,7 @@ void Ent_ReadArcBeam(float isnew) flash.effects = EF_ADDITIVE | EF_FULLBRIGHT; flash.drawmask = MASK_NORMAL; flash.solid = SOLID_NOT; + flash.avelocity_z = 5000; setattachment(flash, self, ""); setorigin(flash, '0 0 0'); diff --git a/qcsrc/common/weapons/w_electro.qc b/qcsrc/common/weapons/w_electro.qc index a8165d371..3847e2d56 100644 --- a/qcsrc/common/weapons/w_electro.qc +++ b/qcsrc/common/weapons/w_electro.qc @@ -248,7 +248,16 @@ void W_Electro_Attack_Bolt(void) W_DecreaseAmmo(WEP_CVAR_PRI(electro, ammo)); - W_SetupShot_ProjectileSize(self, '0 0 -3', '0 0 -3', FALSE, 2, "weapons/electro_fire.wav", CH_WEAPON_A, WEP_CVAR_PRI(electro, damage)); + W_SetupShot_ProjectileSize( + self, + '0 0 -3', + '0 0 -3', + FALSE, + 2, + "weapons/electro_fire.wav", + CH_WEAPON_A, + WEP_CVAR_PRI(electro, damage) + ); pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1); @@ -337,7 +346,16 @@ void W_Electro_Attack_Orb(void) { W_DecreaseAmmo(WEP_CVAR_SEC(electro, ammo)); - W_SetupShot_ProjectileSize(self, '0 0 -4', '0 0 -4', FALSE, 2, "weapons/electro_fire2.wav", CH_WEAPON_A, WEP_CVAR_SEC(electro, damage)); + W_SetupShot_ProjectileSize( + self, + '0 0 -4', + '0 0 -4', + FALSE, + 2, + "weapons/electro_fire2.wav", + CH_WEAPON_A, + WEP_CVAR_SEC(electro, damage) + ); w_shotdir = v_forward; // no TrueAim for grenades please -- 2.39.2