diff --git a/src/game/client/tf/c_tf_player.cpp b/src/game/client/tf/c_tf_player.cpp index 4d6251437c0..0bbda3ba04b 100644 --- a/src/game/client/tf/c_tf_player.cpp +++ b/src/game/client/tf/c_tf_player.cpp @@ -1301,6 +1301,7 @@ bool C_TFRagdoll::IsDecapitation() { return (cl_ragdoll_fade_time.GetFloat() > 5.f) && ((m_iDamageCustom == TF_DMG_CUSTOM_DECAPITATION) + || (m_iDamageCustom == TF_DMG_CUSTOM_HONORBOUND) || (m_iDamageCustom == TF_DMG_CUSTOM_TAUNTATK_BARBARIAN_SWING) || (m_iDamageCustom == TF_DMG_CUSTOM_DECAPITATION_BOSS) || (m_iDamageCustom == TF_DMG_CUSTOM_HEADSHOT_DECAPITATION) @@ -10118,6 +10119,7 @@ bool C_TFPlayer::InSameDisguisedTeam( CBaseEntity *pEnt ) static bool IsDecapitationCustomDamageType( int iCustomDamageType ) { return iCustomDamageType == TF_DMG_CUSTOM_DECAPITATION + || iCustomDamageType == TF_DMG_CUSTOM_HONORBOUND || iCustomDamageType == TF_DMG_CUSTOM_TAUNTATK_BARBARIAN_SWING || iCustomDamageType == TF_DMG_CUSTOM_DECAPITATION_BOSS || iCustomDamageType == TF_DMG_CUSTOM_MERASMUS_DECAPITATION; diff --git a/src/game/server/vscript_server.cpp b/src/game/server/vscript_server.cpp index c1b2eae8c13..967e5989923 100644 --- a/src/game/server/vscript_server.cpp +++ b/src/game/server/vscript_server.cpp @@ -3370,6 +3370,7 @@ DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_SLAP_KILL ) DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_CROC ) DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_TAUNTATK_GASBLAST ) DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_AXTINGUISHER_BOOSTED ) +DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_HONORBOUND ) DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_TAUNTATK_TRICKSHOT ) DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_END ) REGISTER_SCRIPT_CONST_TABLE( ETFDmgCustom ) diff --git a/src/game/shared/tf/achievements_tf_demoman.cpp b/src/game/shared/tf/achievements_tf_demoman.cpp index 8c8919e851e..015c612e600 100644 --- a/src/game/shared/tf/achievements_tf_demoman.cpp +++ b/src/game/shared/tf/achievements_tf_demoman.cpp @@ -142,7 +142,7 @@ class CAchievementTFDemoman_DecapitateCloakedSpy : public CBaseTFAchievement if ( pTFVictim && pTFVictim->IsPlayerClass( TF_CLASS_SPY ) && pTFVictim->m_Shared.InCond( TF_COND_STEALTHED ) ) { int customdmg = event->GetInt( "customkill" ); - if ( customdmg == TF_DMG_CUSTOM_DECAPITATION ) + if ( customdmg == TF_DMG_CUSTOM_DECAPITATION || customdmg == TF_DMG_CUSTOM_HONORBOUND ) { IncrementCount(); } @@ -270,7 +270,7 @@ class CAchievementTFDemoman_DecapitatePlayers : public CBaseTFAchievement return; int customdmg = event->GetInt( "customkill" ); - if ( customdmg == TF_DMG_CUSTOM_DECAPITATION ) + if ( customdmg == TF_DMG_CUSTOM_DECAPITATION || customdmg == TF_DMG_CUSTOM_HONORBOUND ) { IncrementCount(); } @@ -313,7 +313,7 @@ class CAchievementTFDemoman_DecapitatePlayersFast : public CBaseTFAchievement return; int customdmg = event->GetInt( "customkill" ); - if ( customdmg == TF_DMG_CUSTOM_DECAPITATION ) + if ( customdmg == TF_DMG_CUSTOM_DECAPITATION || customdmg == TF_DMG_CUSTOM_HONORBOUND ) { if ( (m_iTimelyDecapitations == 0) || ((m_iTimelyDecapitations > 0) && (gpGlobals->curtime < m_flLastDecapTime + 10.f)) ) { @@ -805,7 +805,7 @@ class CAchievementTFDemoman_DecapitateEqualizer : public CBaseTFAchievement if ( pShovel && (pShovel->GetShovelType() == SHOVEL_DAMAGE_BOOST) ) { int customdmg = event->GetInt( "customkill" ); - if ( customdmg == TF_DMG_CUSTOM_DECAPITATION ) + if ( customdmg == TF_DMG_CUSTOM_DECAPITATION || customdmg == TF_DMG_CUSTOM_HONORBOUND ) { IncrementCount(); } @@ -833,7 +833,7 @@ class CAchievementTFDemoman_DecapitateNemesis : public CBaseTFAchievement if ( pTFVictim && pTFVictim->IsNemesisOfLocalPlayer() ) { int customdmg = event->GetInt( "customkill" ); - if ( customdmg == TF_DMG_CUSTOM_DECAPITATION ) + if ( customdmg == TF_DMG_CUSTOM_DECAPITATION || customdmg == TF_DMG_CUSTOM_HONORBOUND ) { IncrementCount(); } @@ -1035,7 +1035,8 @@ class CAchievementTFDemoman_CritSwordKill : public CBaseTFAchievement { // was this a charge kill with the sword? int nDamageBits = event->GetInt( "damagebits" ); - if ( (nDamageBits & DMG_CRITICAL) && (event->GetInt( "customkill" ) == TF_DMG_CUSTOM_DECAPITATION) ) + int customdmg = event->GetInt( "customkill" ); + if ( (nDamageBits & DMG_CRITICAL) && ( customdmg == TF_DMG_CUSTOM_DECAPITATION || customdmg == TF_DMG_CUSTOM_HONORBOUND ) ) { IncrementCount(); } @@ -1883,4 +1884,3 @@ DECLARE_ACHIEVEMENT( CAchievementTFDemoman_ChargeKillChargingDemo, ACHIEVEMENT_T #endif // CLIENT_DLL - diff --git a/src/game/shared/tf/tf_gamerules.cpp b/src/game/shared/tf/tf_gamerules.cpp index cce13ada8e2..0595d8f56dd 100644 --- a/src/game/shared/tf/tf_gamerules.cpp +++ b/src/game/shared/tf/tf_gamerules.cpp @@ -7283,8 +7283,8 @@ float CTFGameRules::ApplyOnDamageAliveModifyRules( const CTakeDamageInfo &info, // Stomp flRealDamage with resist adjusted values flRealDamage = flDamageBase + flDamageBonus; - // Some Powerups apply a damage multiplier. Backstabs are immune to resist protection - if ( ( pVictim && info.GetDamageCustom() != TF_DMG_CUSTOM_BACKSTAB ) ) + // Some Powerups apply a damage multiplier. Backstabs and honor-bound kills are immune to resist protection + if ( pVictim && info.GetDamageCustom() != TF_DMG_CUSTOM_BACKSTAB && info.GetDamageCustom() != TF_DMG_CUSTOM_HONORBOUND ) { // Plague bleed damage is immune from resist calculation if ( ( !pVictim->m_Shared.InCond( TF_COND_PLAGUE ) && info.GetDamageCustom() != TF_DMG_CUSTOM_BLEEDING ) ) diff --git a/src/game/shared/tf/tf_player_shared.cpp b/src/game/shared/tf/tf_player_shared.cpp index 6fd3052ee5a..173ba24d8a7 100644 --- a/src/game/shared/tf/tf_player_shared.cpp +++ b/src/game/shared/tf/tf_player_shared.cpp @@ -13383,6 +13383,7 @@ int CTFPlayerShared::GetSequenceForDeath( CBaseAnimating* pRagdoll, bool bBurnin { case TF_DMG_CUSTOM_HEADSHOT_DECAPITATION: case TF_DMG_CUSTOM_TAUNTATK_BARBARIAN_SWING: + case TF_DMG_CUSTOM_HONORBOUND: case TF_DMG_CUSTOM_DECAPITATION: case TF_DMG_CUSTOM_HEADSHOT: iDeathSeq = pRagdoll->LookupSequence( "primary_death_headshot" ); @@ -14731,4 +14732,3 @@ bool CTFPlayer::IsHelpmeButtonPressed() const { return m_flHelpmeButtonPressTime != 0.f; } - diff --git a/src/game/shared/tf/tf_shareddefs.cpp b/src/game/shared/tf/tf_shareddefs.cpp index bd54279bc5c..f0da2781537 100644 --- a/src/game/shared/tf/tf_shareddefs.cpp +++ b/src/game/shared/tf/tf_shareddefs.cpp @@ -913,6 +913,7 @@ const char *g_szSpecialDamageNames[] = "TF_DMG_CUSTOM_CROC", "TF_DMG_CUSTOM_TAUNTATK_GASBLAST", "TF_DMG_CUSTOM_AXTINGUISHER_BOOSTED", + "TF_DMG_CUSTOM_HONORBOUND", "TF_DMG_CUSTOM_KRAMPUS_MELEE", "TF_DMG_CUSTOM_KRAMPUS_RANGED", "TF_DMG_CUSTOM_TAUNTATK_TRICKSHOT", @@ -1462,7 +1463,7 @@ void LoadObjectInfos( IBaseFileSystem *pFileSystem ) // Does it make sense to call the below Steam API so it'll force a validation next startup time? // Need to verify it's real corruption and not someone dorking around with their objects.txt file... // - // From Martin Otten: If you have a file on disc and you’re 100% sure it’s + // From Martin Otten: If you have a file on disc and you�re 100% sure it�s // corrupt, call ISteamApps::MarkContentCorrupt( false ), before you shutdown // the game. This will cause a content validation in Steam. diff --git a/src/game/shared/tf/tf_shareddefs.h b/src/game/shared/tf/tf_shareddefs.h index f3b5a91a61f..6662137d7ce 100644 --- a/src/game/shared/tf/tf_shareddefs.h +++ b/src/game/shared/tf/tf_shareddefs.h @@ -1262,6 +1262,7 @@ enum ETFDmgCustom TF_DMG_CUSTOM_CROC, TF_DMG_CUSTOM_TAUNTATK_GASBLAST, TF_DMG_CUSTOM_AXTINGUISHER_BOOSTED, + TF_DMG_CUSTOM_HONORBOUND, TF_DMG_CUSTOM_KRAMPUS_MELEE, TF_DMG_CUSTOM_KRAMPUS_RANGED, TF_DMG_CUSTOM_TAUNTATK_TRICKSHOT, diff --git a/src/game/shared/tf/tf_weapon_sword.cpp b/src/game/shared/tf/tf_weapon_sword.cpp index fba0a9f942c..11c759cecb9 100644 --- a/src/game/shared/tf/tf_weapon_sword.cpp +++ b/src/game/shared/tf/tf_weapon_sword.cpp @@ -562,6 +562,7 @@ float CTFKatana::GetMeleeDamage( CBaseEntity *pTarget, int* piDamageType, int* p if ( pTFPlayerTarget->GetActiveTFWeapon() && pTFPlayerTarget->GetActiveTFWeapon()->IsHonorBound() ) { fDamage = MAX( fDamage, pTFPlayerTarget->GetHealth() * 3 ); + *piCustomDamage = TF_DMG_CUSTOM_HONORBOUND; *piDamageType |= DMG_DONT_COUNT_DAMAGE_TOWARDS_CRIT_RATE; } }