Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/game/client/tf/hud_basedeathnotice.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct DeathNoticeItem

DeathNoticePlayer Killer;
DeathNoticePlayer Victim;
char szIcon[32]; // name of icon to display
char szIcon[64]; // name of icon to display
wchar_t wzInfoText[32]; // any additional text to display next to icon
wchar_t wzInfoTextEnd[32]; // any additional text to display next to victim name
CHudTexture *iconDeath;
Expand Down
25 changes: 24 additions & 1 deletion src/game/client/tf/tf_hud_deathnotice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,10 @@ void CTFHudDeathNotice::OnGameEvent( IGameEvent *event, int iDeathNoticeMsg )
{
Q_strncpy( msg.szIcon, "d_huntsman_headshot", ARRAYSIZE( msg.szIcon ) );
}
else if ( FStrEq( event->GetString( "weapon" ), "deflect_arrow" ) )
{
Q_strncpy( msg.szIcon, "d_deflect_huntsman_headshot", ARRAYSIZE( msg.szIcon ) );
}
else
{
// Did this headshot penetrate something before the kill? If so, show a fancy icon
Expand Down Expand Up @@ -1028,7 +1032,14 @@ void CTFHudDeathNotice::OnGameEvent( IGameEvent *event, int iDeathNoticeMsg )

case TF_DMG_CUSTOM_FLYINGBURN:
// special-case if the player is killed from a burning arrow as the killing blow
Q_strncpy( msg.szIcon, "d_huntsman_flyingburn", ARRAYSIZE( msg.szIcon ) );
if ( FStrEq( event->GetString( "weapon" ), "deflect_arrow" ) )
{
Q_strncpy( msg.szIcon, "d_deflect_huntsman_flyingburn", ARRAYSIZE( msg.szIcon ) );
}
else
{
Q_strncpy( msg.szIcon, "d_huntsman_flyingburn", ARRAYSIZE( msg.szIcon ) );
}
msg.wzInfoText[0] = 0;
break;

Expand Down Expand Up @@ -1161,6 +1172,18 @@ void CTFHudDeathNotice::OnGameEvent( IGameEvent *event, int iDeathNoticeMsg )
msg.wzInfoText[ 0 ] = 0;
break;
}
case TF_DMG_CUSTOM_HEADSHOT_FLYINGBURN:
// special-case if the player is headshot by a burning arrow as the killing blow
if ( FStrEq( event->GetString( "weapon" ), "deflect_arrow" ) )
{
Q_strncpy( msg.szIcon, "d_deflect_huntsman_flyingburn_headshot", ARRAYSIZE( msg.szIcon ) );
}
else
{
Q_strncpy( msg.szIcon, "d_huntsman_flyingburn_headshot", ARRAYSIZE( msg.szIcon ) );
}
msg.wzInfoText[0] = 0;
break;
default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions src/game/server/tf/tf_eventlog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class CTFEventLog : public CEventLog

switch( iCustomDamage )
{
case TF_DMG_CUSTOM_HEADSHOT_FLYINGBURN:
case TF_DMG_CUSTOM_HEADSHOT_DECAPITATION:
case TF_DMG_CUSTOM_HEADSHOT:
pszCustom = "headshot";
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/tf/tf_projectile_arrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ bool CTFProjectile_Arrow::StrikeTarget( mstudiobbox_t *pBox, CBaseEntity *pOther
if ( bHeadshot )
{
nDamageType |= DMG_CRITICAL;
nDamageCustom = TF_DMG_CUSTOM_HEADSHOT;
nDamageCustom = m_bArrowAlight ? TF_DMG_CUSTOM_HEADSHOT_FLYINGBURN : TF_DMG_CUSTOM_HEADSHOT;
}

if ( m_bCritical )
Expand Down
1 change: 1 addition & 0 deletions src/game/server/vscript_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3371,6 +3371,7 @@ 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_TAUNTATK_TRICKSHOT )
DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_HEADSHOT_FLYINGBURN )
DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_END )
REGISTER_SCRIPT_CONST_TABLE( ETFDmgCustom )

Expand Down
10 changes: 1 addition & 9 deletions src/game/shared/tf/tf_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12481,15 +12481,7 @@ const char *CTFGameRules::GetKillingWeaponName( const CTakeDamageInfo &info, CTF
}
else if ( *iWeaponID == TF_WEAPON_COMPOUND_BOW )
{
CTFProjectile_Arrow* pArrow = dynamic_cast<CTFProjectile_Arrow*>( pBaseRocket );
if ( pArrow && pArrow->IsAlight() )
{
killer_weapon_name = "deflect_huntsman_flyingburn";
}
else
{
killer_weapon_name = "deflect_arrow";
}
killer_weapon_name = "deflect_arrow";
}
else if ( *iWeaponID == TF_WEAPON_SHOTGUN_BUILDING_RESCUE )
{
Expand Down
1 change: 1 addition & 0 deletions src/game/shared/tf/tf_player_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13344,6 +13344,7 @@ int CTFPlayerShared::GetSequenceForDeath( CBaseAnimating* pRagdoll, bool bBurnin

switch ( nCustomDeath )
{
case TF_DMG_CUSTOM_HEADSHOT_FLYINGBURN:
case TF_DMG_CUSTOM_HEADSHOT_DECAPITATION:
case TF_DMG_CUSTOM_TAUNTATK_BARBARIAN_SWING:
case TF_DMG_CUSTOM_DECAPITATION:
Expand Down
3 changes: 2 additions & 1 deletion src/game/shared/tf/tf_shareddefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,7 @@ const char *g_szSpecialDamageNames[] =
"TF_DMG_CUSTOM_KRAMPUS_MELEE",
"TF_DMG_CUSTOM_KRAMPUS_RANGED",
"TF_DMG_CUSTOM_TAUNTATK_TRICKSHOT",
"TF_DMG_CUSTOM_HEADSHOT_FLYINGBURN",
};
COMPILE_TIME_ASSERT( ARRAYSIZE( g_szSpecialDamageNames ) == TF_DMG_CUSTOM_END );

Expand Down Expand Up @@ -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.

Expand Down
3 changes: 2 additions & 1 deletion src/game/shared/tf/tf_shareddefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,7 @@ enum ETFDmgCustom
TF_DMG_CUSTOM_KRAMPUS_MELEE,
TF_DMG_CUSTOM_KRAMPUS_RANGED,
TF_DMG_CUSTOM_TAUNTATK_TRICKSHOT,
TF_DMG_CUSTOM_HEADSHOT_FLYINGBURN,
//
// INSERT NEW ITEMS HERE TO AVOID BREAKING DEMOS
//
Expand Down Expand Up @@ -1309,7 +1310,7 @@ inline bool IsDOTDmg( int iType )

inline bool IsHeadshot( int iType )
{
return (iType == TF_DMG_CUSTOM_HEADSHOT || iType == TF_DMG_CUSTOM_HEADSHOT_DECAPITATION);
return (iType == TF_DMG_CUSTOM_HEADSHOT || iType == TF_DMG_CUSTOM_HEADSHOT_DECAPITATION || iType == TF_DMG_CUSTOM_HEADSHOT_FLYINGBURN);
}

enum
Expand Down