From 5eeaaf595238782b414bc0c137f08e1abcbf8e1a Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Wed, 7 Aug 2019 02:04:32 +0300 Subject: [PATCH] Fade shock roach if its owner fades upon death --- dlls/gearbox/strooper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/gearbox/strooper.cpp b/dlls/gearbox/strooper.cpp index 9b26ecab..03122bce 100644 --- a/dlls/gearbox/strooper.cpp +++ b/dlls/gearbox/strooper.cpp @@ -604,7 +604,9 @@ void CStrooper::DropShockRoach() vecPos.z += 32; // now spawn a shockroach. - CBaseEntity::Create( "monster_shockroach", vecPos, vecDropAngles ); + CBaseEntity* roach = CBaseEntity::Create( "monster_shockroach", vecPos, vecDropAngles ); + if (ShouldFadeOnDeath()) + roach->pev->spawnflags |= SF_MONSTER_FADECORPSE; }