This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).
リビジョン | eb916dc540fe5c85a1daf9b31d2dabd118811883 (tree) |
---|---|
日時 | 2021-07-12 04:45:38 |
作者 | Adam Kaminski <kaminskiadam9@gmai...> |
コミッター | Adam Kaminski |
Added the server command: "StopAllSoundsOnThing" which stops all sounds an actor is playing on the client's end.
@@ -2233,6 +2233,17 @@ | ||
2233 | 2233 | } |
2234 | 2234 | break; |
2235 | 2235 | |
2236 | + case SVC2_STOPALLSOUNDSONTHING: | |
2237 | + { | |
2238 | + AActor* actor = CLIENT_FindThingByNetID( pByteStream->ReadShort()); | |
2239 | + | |
2240 | + if ( actor ) | |
2241 | + { | |
2242 | + S_StopAllSoundsFromActor( actor ); | |
2243 | + } | |
2244 | + } | |
2245 | + break; | |
2246 | + | |
2236 | 2247 | case SVC2_SHOOTDECAL: |
2237 | 2248 | { |
2238 | 2249 | FName decalName = NETWORK_ReadName( pByteStream ); |
@@ -378,6 +378,7 @@ | ||
378 | 378 | ENUM_ELEMENT ( SVC2_SYNCMAPROTATION ), |
379 | 379 | ENUM_ELEMENT ( SVC2_ADDTOMAPROTATION ), |
380 | 380 | ENUM_ELEMENT ( SVC2_DELFROMMAPROTATION ), |
381 | + ENUM_ELEMENT ( SVC2_STOPALLSOUNDSONTHING ), | |
381 | 382 | // [BB] Commands necessary for the account system. |
382 | 383 | ENUM_ELEMENT ( SVC2_SRP_USER_START_AUTHENTICATION ), |
383 | 384 | ENUM_ELEMENT ( SVC2_SRP_USER_PROCESS_CHALLENGE ), |
@@ -3913,6 +3913,18 @@ | ||
3913 | 3913 | |
3914 | 3914 | //***************************************************************************** |
3915 | 3915 | // |
3916 | +void SERVERCOMMANDS_StopAllSoundsOnThing( AActor *pActor, ULONG ulPlayerExtra, ServerCommandFlags flags ) | |
3917 | +{ | |
3918 | + if ( EnsureActorHasNetID( pActor ) == false ) | |
3919 | + return; | |
3920 | + | |
3921 | + NetCommand command ( SVC2_STOPALLSOUNDSONTHING ); | |
3922 | + command.addShort( pActor->NetID ); | |
3923 | + command.sendCommandToClients(); | |
3924 | +} | |
3925 | + | |
3926 | +//***************************************************************************** | |
3927 | +// | |
3916 | 3928 | void SERVERCOMMANDS_FullUpdateCompleted( ULONG ulClient ) |
3917 | 3929 | { |
3918 | 3930 | ServerCommands::FullUpdateCompleted().sendCommandToClients( ulClient, SVCF_ONLYTHISCLIENT ); |
@@ -232,6 +232,7 @@ | ||
232 | 232 | void SERVERCOMMANDS_SetThingSpecies( AActor *mobj, ULONG ulPlayerExtra = MAXPLAYERS, ServerCommandFlags flags = 0 ); |
233 | 233 | void SERVERCOMMANDS_UpdateThingScaleNotAtDefault( AActor* pActor, ULONG ulPlayerExtra = MAXPLAYERS, ServerCommandFlags flags = 0 ); |
234 | 234 | void SERVERCOMMANDS_FlashStealthMonster( AActor* pActor, ULONG ulPlayerExtra = MAXPLAYERS, ServerCommandFlags flags = 0 ); |
235 | +void SERVERCOMMANDS_StopAllSoundsOnThing( AActor* pActor, ULONG ulPlayerExtra = MAXPLAYERS, ServerCommandFlags flags = 0 ); | |
235 | 236 | |
236 | 237 | // Print commands. These print some sort of message to the screen. |
237 | 238 | void SERVERCOMMANDS_Print( const char *pszString, ULONG ulPrintLevel, ULONG ulPlayerExtra = MAXPLAYERS, ServerCommandFlags flags = 0 ); |