[TF2] Implement unused teleporter activation sound for MvM#1953
[TF2] Implement unused teleporter activation sound for MvM#1953CookieCat45 wants to merge 2 commits into
Conversation
|
You may want to have a better commit message than 'almost forgot'. |
+1 Valve tends to merge the commits as-is instead of squash merge, so the commit history will end up with word-for-word what you put as the commit message. Best to make them as descriptive as you can (though you'll need to force push over your current branch's history, sadly). |
| PrecacheScriptSound( "Building_Teleporter.SpinLevel1" ); | ||
| PrecacheScriptSound( "Building_Teleporter.SpinLevel2" ); | ||
| PrecacheScriptSound( "Building_Teleporter.SpinLevel3" ); | ||
| PrecacheSound("mvm/mvm_tele_activate.wav"); |
There was a problem hiding this comment.
This should most likely be a script sound like the other sounds, and set up in game_sounds_mvm.txt. You can request for changes to those files in the PR description, and set up the code as if those files were updated.
Also this precache should probably happen alongside the other MVM sounds.
|
|
||
| if ( TFGameRules()->IsMannVsMachineMode() && GetTeamNumber() == TF_TEAM_PVE_INVADERS ) | ||
| { | ||
| EmitSound( "mvm/mvm_tele_activate.wav" ); | ||
| } |
There was a problem hiding this comment.
Instead of here, this logic should live in C_TFBotHintEngineerNest::StartEffect in src\game\client\tf\bot_npc\map_entities\c_tf_bot_hint_engineer_nest.cpp alongside the particle effect logic, or in its serverside code CTFBotHintEngineerNest::HintTeleporterThink in src\game\server\tf\bot\map_entities\tf_bot_hint_engineer_nest.cpp.
There's already examples of EmitSound being called on hint entities like this, e.g. CTFBotMvMEngineerTeleportSpawn::Update calls EmitSound on its hint entity. However, if you want the noise to be global, you can use TFGameRules()->BroadcastSound (which that class also does).
(You could probably get away with emitting it on the clientside object, honestly).
|
This is honeslty such a simple yet meaningfull change, without this sound there's now ways to know if a teleporter is active other than checking the wave status, which people often don't in the middle of battle. A welcomed change for the mvm update :) |
Implements the unused Teleporter activation sound for MvM into the game:
mvm/mvm_tele_activate.wavVideo_2026-06-06_18-12-51.mp4