Fix connection issues when joining existing game from menu (#100)

* fix it
This commit is contained in:
Mister_Nebula 2020-07-29 15:07:07 +01:00 committed by GitHub
parent 18a520bc78
commit 12174c0d04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 6 deletions

View File

@ -48,7 +48,7 @@ namespace QSB.TransformSync
protected override bool IsReady()
{
return Locator.GetPlayerTransform() != null;
return Locator.GetPlayerTransform() != null && PlayerRegistry.PlayerExists(GetAttachedNetId());
}
}
}

View File

@ -31,7 +31,6 @@ namespace QSB.TransformSync
protected override Transform InitLocalTransform()
{
DebugLog.ToConsole("PlayerSync local " + GetAttachedNetId());
var body = GetPlayerModel();
bodyTransform = body;
@ -45,7 +44,6 @@ namespace QSB.TransformSync
protected override Transform InitRemoteTransform()
{
DebugLog.ToConsole("PlayerSync remote " + GetAttachedNetId());
var body = Instantiate(GetPlayerModel());
bodyTransform = body;
@ -62,7 +60,7 @@ namespace QSB.TransformSync
protected override bool IsReady()
{
return Locator.GetPlayerTransform() != null;
return Locator.GetPlayerTransform() != null && PlayerRegistry.PlayerExists(GetAttachedNetId());
}
}
}

View File

@ -30,13 +30,11 @@ namespace QSB.TransformSync
protected override Transform InitLocalTransform()
{
DebugLog.ToConsole("ShipSync local " + GetAttachedNetId());
return GetShipModel().Find("Module_Cockpit/Geo_Cockpit/Cockpit_Geometry/Cockpit_Exterior");
}
protected override Transform InitRemoteTransform()
{
DebugLog.ToConsole("ShipSync remote " + GetAttachedNetId());
var shipModel = GetShipModel();
var remoteTransform = new GameObject().transform;