Restored Heavy MvM Rage responses/vo + added fallback for other modes

Updated Heavy Rage code to now trigger MvM Rage response rule in MvM.  It will now play the correct scenes with lipsync without interruption.

Added fallback code for other gameplay situations (ie. Freaky Fair)
This commit is contained in:
rabscootle 2025-03-30 06:45:41 -05:00
parent ceb6d4d783
commit 366be2c813
3 changed files with 1924 additions and 8 deletions

File diff suppressed because it is too large Load diff

View file

@ -3106,7 +3106,13 @@ void CTFPlayer::PrecacheTFPlayer()
PrecacheScriptSound( "Spy.TeaseVictim" );
PrecacheScriptSound( "Demoman.CritDeath" );
PrecacheScriptSound( "Heavy.Battlecry03" );
// precache Heavy rage vo
PrecacheScriptSound("Heavy.Battlecry03");
PrecacheScriptSound("heavy_mvm_rage01");
PrecacheScriptSound("heavy_mvm_rage02");
PrecacheScriptSound("heavy_mvm_rage03");
PrecacheScriptSound("heavy_mvm_rage04");
PrecacheModel( "models/effects/resist_shield/resist_shield.mdl" );
@ -17803,6 +17809,11 @@ void CTFPlayer::Taunt( taunts_t iTauntIndex, int iTauntConcept )
return;
}
// Allow voice commands, etc to be interrupted.
CMultiplayer_Expresser* pExpresser = GetMultiplayerExpresser();
Assert(pExpresser);
pExpresser->AllowMultipleScenes();
// Heavies can purchase a rage-based knockback+stun effect in MvM,
// so ignore taunt and activate rage if we're at full rage
if ( IsPlayerClass( TF_CLASS_HEAVYWEAPONS ) )
@ -17816,7 +17827,15 @@ void CTFPlayer::Taunt( taunts_t iTauntIndex, int iTauntConcept )
if ( m_Shared.GetRageMeter() >= 100.f )
{
m_Shared.m_bRageDraining = true;
EmitSound( "Heavy.Battlecry03" );
// Keep MvM lines exclusive to the mode, use generic lines elsewhere
if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() && GetTeamNumber() == TF_TEAM_PVE_DEFENDERS )
SpeakConceptIfAllowed( MP_CONCEPT_MVM_DEPLOY_RAGE );
else
SpeakConceptIfAllowed( MP_CONCEPT_PLAYER_BATTLECRY );
pExpresser->DisallowMultipleScenes();
return;
}
@ -17826,11 +17845,6 @@ void CTFPlayer::Taunt( taunts_t iTauntIndex, int iTauntConcept )
}
}
// Allow voice commands, etc to be interrupted.
CMultiplayer_Expresser *pExpresser = GetMultiplayerExpresser();
Assert( pExpresser );
pExpresser->AllowMultipleScenes();
m_hTauntItem = NULL;
m_bInitTaunt = true;

View file

@ -677,7 +677,26 @@ void CTFMinigun::ActivatePushBackAttackMode( void )
}
pOwner->m_Shared.StartRageDrain();
EmitSound( "Heavy.Battlecry03" );
CMultiplayer_Expresser* pExpresser = pOwner->GetMultiplayerExpresser();
Assert(pExpresser);
pExpresser->AllowMultipleScenes();
// Keep MvM lines exclusive to the mode, use generic lines elsewhere
if ( pOwner->IsPlayerClass( TF_CLASS_HEAVYWEAPONS ))
{
if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() && GetTeamNumber() == TF_TEAM_PVE_DEFENDERS )
{
pOwner->SpeakConceptIfAllowed(MP_CONCEPT_MVM_DEPLOY_RAGE);
pExpresser->DisallowMultipleScenes();
return;
}
}
pOwner->SpeakConceptIfAllowed( MP_CONCEPT_PLAYER_BATTLECRY );
pExpresser->DisallowMultipleScenes();
return;
}
//-----------------------------------------------------------------------------