From 49ef35a1920f001344951659aa4cb78d53c79f9f Mon Sep 17 00:00:00 2001 From: CookieCat <81494827+CookieCat45@users.noreply.github.com> Date: Mon, 18 May 2026 05:55:40 -0400 Subject: [PATCH] fix vampire crash --- src/game/shared/tf/tf_gamerules.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/shared/tf/tf_gamerules.cpp b/src/game/shared/tf/tf_gamerules.cpp index 01640475c4a..80d4d20c2bb 100644 --- a/src/game/shared/tf/tf_gamerules.cpp +++ b/src/game/shared/tf/tf_gamerules.cpp @@ -7494,7 +7494,7 @@ float CTFGameRules::ApplyOnDamageAliveModifyRules( const CTakeDamageInfo &info, { if ( flRealDamage > 0 ) { - if ( pTFAttacker->GetActiveTFWeapon()->GetWeaponID() == TF_WEAPON_MINIGUN || pTFAttacker->GetActiveTFWeapon()->GetWeaponID() == TF_WEAPON_FLAMETHROWER ) + if ( pTFAttacker->GetActiveTFWeapon() && ( pTFAttacker->GetActiveTFWeapon()->GetWeaponID() == TF_WEAPON_MINIGUN || pTFAttacker->GetActiveTFWeapon()->GetWeaponID() == TF_WEAPON_FLAMETHROWER ) ) { pTFAttacker->TakeHealth( ( flRealDamage * 0.6f ), DMG_GENERIC ); }