Skip to content

[TF2] Implement unused teleporter activation sound for MvM#1953

Open
CookieCat45 wants to merge 2 commits into
ValveSoftware:masterfrom
CookieCat45:mvm-tele-startsound
Open

[TF2] Implement unused teleporter activation sound for MvM#1953
CookieCat45 wants to merge 2 commits into
ValveSoftware:masterfrom
CookieCat45:mvm-tele-startsound

Conversation

@CookieCat45

Copy link
Copy Markdown

Implements the unused Teleporter activation sound for MvM into the game: mvm/mvm_tele_activate.wav

Video_2026-06-06_18-12-51.mp4

@JoriKos

JoriKos commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

You may want to have a better commit message than 'almost forgot'.

@FlaminSarge

Copy link
Copy Markdown
Contributor

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");

@FlaminSarge FlaminSarge Jun 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +447 to +451

if ( TFGameRules()->IsMannVsMachineMode() && GetTeamNumber() == TF_TEAM_PVE_INVADERS )
{
EmitSound( "mvm/mvm_tele_activate.wav" );
}

@FlaminSarge FlaminSarge Jun 8, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@Pygargue00fr

Copy link
Copy Markdown

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants