From d0799e0ca0bc42e931d3ef030c4ba6b761a7139a Mon Sep 17 00:00:00 2001 From: RGBACatlord <37526906+RGBACatlord@users.noreply.github.com> Date: Sat, 20 Dec 2025 01:27:47 +1300 Subject: [PATCH] Check if player is alive before showing VM effects Fixes effects flooding the screen when spectating a dead teammate in first person with an unusual weapon --- src/game/shared/econ/econ_entity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/shared/econ/econ_entity.cpp b/src/game/shared/econ/econ_entity.cpp index f3aa69b224d..85383107bff 100644 --- a/src/game/shared/econ/econ_entity.cpp +++ b/src/game/shared/econ/econ_entity.cpp @@ -1246,7 +1246,7 @@ void CEconEntity::UpdateParticleSystems( void ) // Make sure the entity we're attaching to is being drawn CTFWeaponBase *pWeapon = dynamic_cast< CTFWeaponBase* >( this ); C_BasePlayer *pLocalPlayer = C_BasePlayer::GetLocalPlayer(); - if ( pLocalPlayer && pLocalPlayer == GetOwnerEntity() && pLocalPlayer->GetViewModel() && pLocalPlayer->GetViewModel()->GetWeapon() == pWeapon && !C_BasePlayer::ShouldDrawLocalPlayer() ) + if ( pLocalPlayer && pLocalPlayer == GetOwnerEntity() && pLocalPlayer->GetViewModel() && pLocalPlayer->GetViewModel()->GetWeapon() == pWeapon && !C_BasePlayer::ShouldDrawLocalPlayer() && pLocalPlayer->IsAlive() ) { nVisible = PARTICLE_SYSTEM_STATE_VISIBLE_VM; }