mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-05 06:39:50 +00:00
add more null checks
This commit is contained in:
parent
6099fa5fd1
commit
2889bffb16
@ -13,7 +13,13 @@ public class ShipThrusterAudioOneShotMessage : QSBMessage<(AudioType audioType,
|
||||
|
||||
public override void OnReceiveRemote()
|
||||
{
|
||||
var source = ShipManager.Instance.ShipThrusterAudio._rotationalSource;
|
||||
var source = ShipManager.Instance?.ShipThrusterAudio?._rotationalSource;
|
||||
|
||||
if (source == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
source.pitch = Data.pitch;
|
||||
source.PlayOneShot(Data.audioType, Data.volume);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ using QSB.WorldSync;
|
||||
namespace QSB.ShipSync.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(ShipDetachableModule))]
|
||||
internal class ShipDetachableModulePatches : QSBPatch
|
||||
public class ShipDetachableModulePatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -8,7 +8,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.ShipSync.Patches;
|
||||
|
||||
internal class ShipFlameWashPatches : QSBPatch
|
||||
public class ShipFlameWashPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user