From b702f166d1effd99f7ea5d03bf0cd45ccd72d904 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Thu, 18 Feb 2021 09:54:52 +0100 Subject: [PATCH] Client: Make sure the weaponFX gets wiped upon any weapon-switch, to avoid anything from still drawing upon respawn or forced switches --- valve/data.pk3dir/particles/weapon_egon.cfg | 20 +++++++++++++++++--- valve/src/shared/w_egon.qc | 4 ++-- valve/src/shared/weapon_common.qc | 7 +++++++ 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/valve/data.pk3dir/particles/weapon_egon.cfg b/valve/data.pk3dir/particles/weapon_egon.cfg index 4e87006a..9230c3e3 100644 --- a/valve/data.pk3dir/particles/weapon_egon.cfg +++ b/valve/data.pk3dir/particles/weapon_egon.cfg @@ -4,15 +4,29 @@ r_part beam tcoords 0 0 16 16 32 scale 1 scalefactor 0.8 - step 0.25 - alpha 0.1 + step 1 + alpha 0.25 spawnmode spiral 32 spawnorg 3 spawnvel 18 blend adda rgbf 0.5 0.5 1.0 -} +} r_part +beam +{ + texture "particles/fteparticlefont.tga" + tcoords 97 97 191 191 256 + scale 2 + scaledelta 0.25 + rgbf 1 1 1 + alpha 0.25 + blend add + step 4 + randomvel 0 + type beam +} + +r_part trail { texture "classicparticle" tcoords 0 0 16 16 32 diff --git a/valve/src/shared/w_egon.qc b/valve/src/shared/w_egon.qc index 683f6d5a..dfaf61d4 100644 --- a/valve/src/shared/w_egon.qc +++ b/valve/src/shared/w_egon.qc @@ -66,10 +66,10 @@ FXEgon::Draw(void) endpos = src + v_forward * 1024; traceline(src, endpos, FALSE, pl); - dynamiclight_add(trace_endpos + v_forward * -16, 128, [0.25, 0.25, 1.0]); + dynamiclight_add(trace_endpos + v_forward * -16, 128, [0.5, 0.5, 1.0]); trailparticles(TRAIL_EGONBEAM, pl, gunpos, trace_endpos); setorigin(this, trace_endpos + v_forward * -16); - + /* R_BeginPolygon(SPRITE_EGONIMPACT, 1, 0); R_PolygonVertex(trace_endpos + v_right * 24 - v_up * 24 + v_forward * -16, [1,1], [1,1,1], 1.0f); diff --git a/valve/src/shared/weapon_common.qc b/valve/src/shared/weapon_common.qc index 3ab43a77..2a397919 100644 --- a/valve/src/shared/weapon_common.qc +++ b/valve/src/shared/weapon_common.qc @@ -76,6 +76,13 @@ void Weapons_Draw(void) pl.w_idle_next = 2.5f; pl.viewzoom = 1.0f; +#ifdef CLIENT + entity eold = self; + self = pSeat->m_pWeaponFX; + spawnfunc_CBaseFX(); + self = eold; +#endif + /* make sure this is all wiped */ pl.a_ammo1 = pl.a_ammo2 = pl.a_ammo3 = 0;