dont do probe events if not loaded

This commit is contained in:
Mister_Nebula 2021-09-14 20:59:48 +01:00
parent 063a6d0705
commit ec9a5cdbb9
2 changed files with 10 additions and 0 deletions

View File

@ -25,6 +25,11 @@ namespace QSB.ProbeSync.Events
public override void OnReceiveRemote(bool server, EnumMessage<ProbeEvent> message)
{
var player = QSBPlayerManager.GetPlayer(message.AboutId);
if (!player.PlayerStates.IsReady || player.Probe == null)
{
return;
}
var probe = player.Probe;
probe.HandleEvent(message.EnumValue);

View File

@ -25,6 +25,11 @@ namespace QSB.ProbeSync.Events
public override void OnReceiveRemote(bool server, FloatMessage message)
{
var player = QSBPlayerManager.GetPlayer(message.AboutId);
if (!player.PlayerStates.IsReady || player.Probe == null)
{
return;
}
var probe = player.Probe;
probe.OnStartRetrieve(message.Value);
}