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
10 changes: 10 additions & 0 deletions src/game/server/tf/tf_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down
6 changes: 4 additions & 2 deletions src/game/shared/econ/econ_entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 5 additions & 1 deletion src/game/shared/tf/tf_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
Expand Down
2 changes: 1 addition & 1 deletion src/game/shared/tf/tf_weaponbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down