-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for sound errors from RC3 (#1730)
* Remove bubbles from whitelist * Refactor Model.helper.Validate * Fix MedicalCabinet sounds * Dev-QoL for FMOD Processors
- Loading branch information
Showing
12 changed files
with
163 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 23 additions & 14 deletions
37
NitroxClient/Communication/Packets/Processors/MedicalCabinetClickedProcessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 21 additions & 25 deletions
46
NitroxClient/Communication/Packets/Processors/PlayFMODCustomEmitterProcessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 8 additions & 13 deletions
21
NitroxClient/Communication/Packets/Processors/PlayFMODCustomLoopingEmitterProcessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,18 @@ | ||
using NitroxClient.Communication.Packets.Processors.Abstract; | ||
using NitroxClient.MonoBehaviours; | ||
using NitroxModel.DataStructures.Util; | ||
using NitroxModel.Helper; | ||
using NitroxClient.Unity.Helper; | ||
using NitroxModel.Packets; | ||
using UnityEngine; | ||
|
||
namespace NitroxClient.Communication.Packets.Processors | ||
namespace NitroxClient.Communication.Packets.Processors; | ||
|
||
public class PlayFMODCustomLoopingEmitterProcessor : ClientPacketProcessor<PlayFMODCustomLoopingEmitter> | ||
{ | ||
public class PlayFMODCustomLoopingEmitterProcessor : ClientPacketProcessor<PlayFMODCustomLoopingEmitter> | ||
public override void Process(PlayFMODCustomLoopingEmitter packet) | ||
{ | ||
public override void Process(PlayFMODCustomLoopingEmitter packet) | ||
{ | ||
Optional<GameObject> soundSource = NitroxEntity.GetObjectFrom(packet.Id); | ||
Validate.IsPresent(soundSource); | ||
|
||
FMODEmitterController fmodEmitterController = soundSource.Value.GetComponent<FMODEmitterController>(); | ||
Validate.IsTrue(fmodEmitterController); | ||
GameObject soundSource = NitroxEntity.RequireObjectFrom(packet.Id); | ||
FMODEmitterController fmodEmitterController = soundSource.RequireComponent<FMODEmitterController>(); | ||
|
||
fmodEmitterController.PlayCustomLoopingEmitter(packet.AssetPath); | ||
} | ||
fmodEmitterController.PlayCustomLoopingEmitter(packet.AssetPath); | ||
} | ||
} |
45 changes: 20 additions & 25 deletions
45
NitroxClient/Communication/Packets/Processors/PlayFMODStudioEventEmitterProcessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace System.Runtime.CompilerServices; | ||
|
||
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)] | ||
internal sealed class CallerArgumentExpressionAttribute : Attribute | ||
{ | ||
public CallerArgumentExpressionAttribute(string parameterName) | ||
{ | ||
ParameterName = parameterName; | ||
} | ||
|
||
public string ParameterName { get; } | ||
} |
Oops, something went wrong.