mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-25 06:35:45 +00:00
Fix connection issues when joining existing game from menu (#100)
* fix it
This commit is contained in:
parent
18a520bc78
commit
12174c0d04
@ -48,7 +48,7 @@ namespace QSB.TransformSync
|
||||
|
||||
protected override bool IsReady()
|
||||
{
|
||||
return Locator.GetPlayerTransform() != null;
|
||||
return Locator.GetPlayerTransform() != null && PlayerRegistry.PlayerExists(GetAttachedNetId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user