-
Notifications
You must be signed in to change notification settings - Fork 3k
[TF2] Implement unused teleporter activation sound for MvM #1953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -444,6 +444,11 @@ void CObjectTeleporter::OnGoActive( void ) | |
| UpdateMaxHealth( pMatch->GetMaxHealth() ); | ||
| } | ||
| } | ||
|
|
||
| if ( TFGameRules()->IsMannVsMachineMode() && GetTeamNumber() == TF_TEAM_PVE_INVADERS ) | ||
| { | ||
| EmitSound( "mvm/mvm_tele_activate.wav" ); | ||
| } | ||
| } | ||
|
|
||
| //----------------------------------------------------------------------------- | ||
|
|
@@ -482,6 +487,7 @@ void CObjectTeleporter::Precache() | |
| PrecacheScriptSound( "Building_Teleporter.SpinLevel1" ); | ||
| PrecacheScriptSound( "Building_Teleporter.SpinLevel2" ); | ||
| PrecacheScriptSound( "Building_Teleporter.SpinLevel3" ); | ||
| PrecacheSound("mvm/mvm_tele_activate.wav"); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
|
||
| PrecacheParticleSystem( "teleporter_red_charged" ); | ||
| PrecacheParticleSystem( "teleporter_blue_charged" ); | ||
|
|
@@ -1537,4 +1543,4 @@ void CObjectTeleporter::FireGameEvent( IGameEvent *event ) | |
| SetTeleportingPlayer( NULL ); | ||
| } | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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::StartEffectinsrc\game\client\tf\bot_npc\map_entities\c_tf_bot_hint_engineer_nest.cppalongside the particle effect logic, or in its serverside codeCTFBotHintEngineerNest::HintTeleporterThinkinsrc\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::Updatecalls 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).