This commit is contained in:
Aleksander Waage 2020-08-15 21:16:21 +02:00
parent 3693dd25be
commit 91f9e5b9dc
4 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ namespace QSB.Events
public override void OnServerReceive(PlayerMessage message)
{
PlayerState.LocalInstance.Send();
foreach (var item in PlayerRegistry.TransformSyncs.Where(x => x.IsReady && x.ReferenceSector != null))
foreach (var item in PlayerRegistry.TransformSyncs.Where(x => x != null && x.IsReady && x.ReferenceSector != null))
{
GlobalMessenger<uint, Sector.Name, string>.FireEvent(EventNames.QSBSectorChange, item.netId.Value, item.ReferenceSector.GetName(), item.ReferenceSector.name);
}

View File

@ -71,6 +71,6 @@ namespace QSB.TransformSync
SyncedTransform.localPosition = ReferenceSector.transform.InverseTransformPoint(Player.ProbeLauncher.ToolGameObject.transform.position);
}
public override bool IsReady => Locator.GetProbe() != null && Player != null && (Player?.IsReady).Value;
public override bool IsReady => Locator.GetProbe() != null && Player != null && Player.IsReady;
}
}

View File

@ -49,6 +49,6 @@ namespace QSB.TransformSync
return body;
}
public override bool IsReady => Locator.GetPlayerTransform() != null && Player != null && (Player?.IsReady).Value;
public override bool IsReady => Locator.GetPlayerTransform() != null && Player != null && Player.IsReady;
}
}

View File

@ -51,6 +51,6 @@ namespace QSB.TransformSync
return remoteTransform;
}
public override bool IsReady => GetShipModel() != null && Player != null && (Player?.IsReady).Value;
public override bool IsReady => GetShipModel() != null && Player != null && Player.IsReady;
}
}