From 01f0b565de4fc4bb90f9f0a8a7c696b4a5ba6e4d Mon Sep 17 00:00:00 2001 From: Piogre Date: Mon, 17 Aug 2026 23:45:35 -0700 Subject: [PATCH 1/2] Mark active weapon as being repurposed-for-taunt for Guitar and Armageddon taunts "special" (equippable) taunts mark the active weapon as being repurposed as a prop for their duration if applicable, preventing its attachments from being drawn The same is not done for the two default weapon taunts that replace the weapon with a prop, which causes the festivizer attachment to continue drawing for those two weapons (frontier justice and rainblower) if there is one This commit adds to those taunts' respective scripts to set this variable for the weapon as well, to prevent a floating festivizer from being drawn during the taunts, should it be implemented for these weapons. --- src/game/server/tf/tf_player.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/game/server/tf/tf_player.cpp b/src/game/server/tf/tf_player.cpp index d29e346def0..c562423628b 100644 --- a/src/game/server/tf/tf_player.cpp +++ b/src/game/server/tf/tf_player.cpp @@ -17986,6 +17986,11 @@ void CTFPlayer::Taunt( taunts_t iTauntIndex, int iTauntConcept ) } else if ( !V_stricmp( szResponse, "scenes/player/pyro/low/taunt_bubbles.vcd" ) ) { + CTFWeaponBase* pWeapon = GetActiveTFWeapon(); + if (pWeapon) + { + pWeapon->SetIsBeingRepurposedForTaunt(true); + } m_flTauntAttackTime = gpGlobals->curtime + 3.0f; m_iTauntAttack = TAUNTATK_PYRO_ARMAGEDDON; @@ -18102,6 +18107,11 @@ void CTFPlayer::Taunt( taunts_t iTauntIndex, int iTauntConcept ) { if ( !V_stricmp( szResponse, "scenes/player/engineer/low/taunt07.vcd" ) ) { + CTFWeaponBase* pWeapon = GetActiveTFWeapon(); + if (pWeapon) + { + pWeapon->SetIsBeingRepurposedForTaunt(true); + } m_flTauntAttackTime = gpGlobals->curtime + 3.695f; m_iTauntAttack = TAUNTATK_ENGINEER_GUITAR_SMASH; } From 74f266d52b906a99d55861b72b56b9ec03216eaa Mon Sep 17 00:00:00 2001 From: Piogre Date: Tue, 18 Aug 2026 00:15:40 -0700 Subject: [PATCH 2/2] Apply Pyrovision filter to festive weapon attachments Two weapons, the Lollichop and the Rainblower, change their weapon models to their stock counterparts if the viewer isn't in Pyroland, in certain contexts. If these weapons were to be made festivizer-compatible, this would cause a problem with the drawing of the festivizer, since it would attempt to draw the model fitted to these pyroland weapons over the stock weapon model. This fixes this issue, correctly applying the vision filter and reverting to the stock weapons' festivizer models where appropriate. --- src/game/shared/econ/econ_entity.cpp | 6 ++++-- src/game/shared/tf/tf_gamerules.cpp | 6 +++++- src/game/shared/tf/tf_weaponbase.cpp | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/game/shared/econ/econ_entity.cpp b/src/game/shared/econ/econ_entity.cpp index 85383107bff..7934c3051df 100644 --- a/src/game/shared/econ/econ_entity.cpp +++ b/src/game/shared/econ/econ_entity.cpp @@ -1115,9 +1115,11 @@ void CEconEntity::UpdateAttachmentModels( void ) { for ( int i = 0; i < iAttachedModels; i++ ) { - attachedmodel_t *pModel = pItemDef->GetAttachedModelDataFestivized( iTeamNumber, i ); + attachedmodel_t *pModel = pItemDef->GetAttachedModelDataFestivized( iTeamNumber, i ); + //check for vision filter of attachment, but NOT if showing the viewmodel since viewmodel won't filter the base weapon model + CBasePlayer* pOwner = ToBasePlayer( GetOwnerEntity() ); + int iModelIndex = modelinfo->GetModelIndex( ( ( !pOwner || pOwner->ShouldDrawThisPlayer() ) && GameRules() ) ? GameRules()->TranslateEffectForVisionFilter( "weapons", pModel->m_pszModelName ) : pModel->m_pszModelName ); - int iModelIndex = modelinfo->GetModelIndex( pModel->m_pszModelName ); if ( iModelIndex >= 0 ) { AttachedModelData_t attachedModelData; diff --git a/src/game/shared/tf/tf_gamerules.cpp b/src/game/shared/tf/tf_gamerules.cpp index 01640475c4a..0d6a514ba9a 100644 --- a/src/game/shared/tf/tf_gamerules.cpp +++ b/src/game/shared/tf/tf_gamerules.cpp @@ -17410,13 +17410,17 @@ void CTFGameRules::SetUpVisionFilterKeyValues( void ) // No special vision pKVFlag = new KeyValues( "0" ); pKVFlag->SetString( "models/weapons/c_models/c_rainblower/c_rainblower.mdl", "models/weapons/c_models/c_flamethrower/c_flamethrower.mdl" ); - pKVFlag->SetString( "models/weapons/c_models/c_lollichop/c_lollichop.mdl", "models/weapons/w_models/w_fireaxe.mdl" ); + pKVFlag->SetString( "models/weapons/c_models/c_lollichop/c_lollichop.mdl", "models/weapons/c_models/c_fireaxe_pyro/c_fireaxe_pyro.mdl" ); + pKVFlag->SetString( "models/weapons/c_models/c_rainblower/c_rainblower_festivizer.mdl", "models/weapons/c_models/c_flamethrower/c_flamethrower_festivizer.mdl" ); + pKVFlag->SetString( "models/weapons/c_models/c_lollichop/c_lollichop_festivizer.mdl", "models/weapons/c_models/c_fireaxe_pyro/c_fireaxe_pyro_festivizer.mdl" ); pKVBlock->AddSubKey( pKVFlag ); // Pyrovision pKVFlag = new KeyValues( "1" ); pKVFlag->SetString( "models/weapons/c_models/c_rainblower/c_rainblower.mdl", "models/weapons/c_models/c_rainblower/c_rainblower.mdl" ); //explicit set for pyrovision pKVFlag->SetString( "models/weapons/c_models/c_lollichop/c_lollichop.mdl", "models/weapons/c_models/c_lollichop/c_lollichop.mdl" ); + pKVFlag->SetString( "models/weapons/c_models/c_rainblower/c_rainblower_festivizer.mdl", "models/weapons/c_models/c_rainblower/c_rainblower_festivizer.mdl" ); + pKVFlag->SetString( "models/weapons/c_models/c_lollichop/c_lollichop_festivizer.mdl", "models/weapons/c_models/c_lollichop/c_lollichop_festivizer.mdl" ); pKVFlag->SetString( "models/player/items/demo/demo_bombs.mdl", "models/player/items/all_class/mtp_bottle_demo.mdl" ); pKVFlag->SetString( "models/player/items/pyro/xms_pyro_bells.mdl", "models/player/items/all_class/mtp_bottle_pyro.mdl" ); diff --git a/src/game/shared/tf/tf_weaponbase.cpp b/src/game/shared/tf/tf_weaponbase.cpp index 638cc6fe3e3..fdcb9efec30 100644 --- a/src/game/shared/tf/tf_weaponbase.cpp +++ b/src/game/shared/tf/tf_weaponbase.cpp @@ -3374,7 +3374,7 @@ void CTFWeaponBase::UpdateAttachmentModels( void ) { attachedmodel_t *pModel = pItemDef->GetAttachedModelDataFestivized( iTeamNumber, i ); - int iModelIndex = modelinfo->GetModelIndex( pModel->m_pszModelName ); + int iModelIndex = modelinfo->GetModelIndex(GameRules() ? GameRules()->TranslateEffectForVisionFilter("weapons", pModel->m_pszModelName) : pModel->m_pszModelName); if ( iModelIndex >= 0 ) { AttachedModelData_t attachedModelData;