Add Shield Fixes

This commit is contained in:
Herobrine0412 2025-10-19 20:05:59 -04:00
parent 4fa8b72a80
commit 19aa81382f
1 changed files with 26 additions and 0 deletions

View File

@ -11488,6 +11488,32 @@ void CTFPlayer::CheckSpellHalloweenDeathGhosts( const CTakeDamageInfo &info, CTF
}
}
}
else if (IsPlayerClass(TF_CLASS_DEMOMAN))
{
if (info.GetDamageCustom() == TF_DMG_CUSTOM_CHARGE_IMPACT && iHalloweenDeathGhosts == 0) // Was the death due to the shield?
{
CTFWearableDemoShield* pShield = NULL;
// Find a shield wearable...
for (int i = 0; i < GetNumWearables(); ++i)
{
CEconWearable* pItem = GetWearable(i);
if (!pItem)
continue;
CTFWearableDemoShield* pTempShield = dynamic_cast<CTFWearableDemoShield*>(pItem);
if (!pTempShield)
continue;
pShield = pTempShield;
}
if (pShield)
{
CALL_ATTRIB_HOOK_INT_ON_OTHER(pShield, iHalloweenDeathGhosts, halloween_death_ghosts);
}
}
}
if (iHalloweenDeathGhosts == 0) // This uses the actual weapon
{