remove world object

This commit is contained in:
Mister_Nebula 2021-05-10 14:32:47 +01:00
parent f43c813b5d
commit daac9317f6
6 changed files with 4 additions and 43 deletions

View File

@ -251,8 +251,6 @@
<Compile Include="ShipSync\Events\HatchEvent.cs" />
<Compile Include="ShipSync\Patches\ShipPatches.cs" />
<Compile Include="ShipSync\ShipManager.cs" />
<Compile Include="ShipSync\ShipWorldObjectManager.cs" />
<Compile Include="ShipSync\WorldObjects\QSBShip.cs" />
<Compile Include="StatueSync\Events\StartStatueEvent.cs" />
<Compile Include="StatueSync\Events\StartStatueMessage.cs" />
<Compile Include="StatueSync\Patches\StatuePatches.cs" />

View File

@ -19,7 +19,6 @@ using QSB.QuantumSync.WorldObjects;
using QSB.SectorSync;
using QSB.ShipSync;
using QSB.ShipSync.TransformSync;
using QSB.ShipSync.WorldObjects;
using QSB.StatueSync;
using QSB.TimeSync;
using QSB.TranslationSync;
@ -118,7 +117,6 @@ namespace QSB
gameObject.AddComponent<PoolManager>();
gameObject.AddComponent<CampfireManager>();
gameObject.AddComponent<CharacterAnimManager>();
gameObject.AddComponent<ShipWorldObjectManager>();
DebugBoxManager.Init();

View File

@ -3,7 +3,6 @@ using QSB.Events;
using QSB.Messaging;
using QSB.Player;
using QSB.ShipSync.TransformSync;
using QSB.ShipSync.WorldObjects;
using QSB.Utility;
using QSB.WorldSync;
using QuantumUNET;

View File

@ -1,16 +0,0 @@
using OWML.Common;
using QSB.ShipSync.WorldObjects;
using QSB.Utility;
using QSB.WorldSync;
namespace QSB.ShipSync
{
public class ShipWorldObjectManager : WorldObjectManager
{
protected override void RebuildWorldObjects(OWScene scene)
{
DebugLog.DebugWrite("Rebuilding ship object...", MessageType.Warning);
QSBWorldSync.Init<QSBShip, ShipBody>();
}
}
}

View File

@ -1,5 +1,4 @@
using QSB.Player;
using QSB.ShipSync.WorldObjects;
using QSB.Syncs.TransformSync;
using QSB.WorldSync;
using System.Linq;
@ -12,8 +11,8 @@ namespace QSB.ShipSync.TransformSync
public override bool UseInterpolation => true;
public override bool IsReady
=> QSBWorldSync.GetWorldObjects<QSBShip>().Count() != 0;
public override bool IsReady
=> Locator.GetShipBody() != null;
public override void OnStartLocalPlayer()
=> LocalInstance = this;
@ -21,13 +20,13 @@ namespace QSB.ShipSync.TransformSync
protected override OWRigidbody InitLocalTransform()
{
SectorSync.SetSectorDetector(Locator.GetShipDetector().GetComponent<SectorDetector>());
return QSBWorldSync.GetWorldFromId<QSBShip>(0).AttachedObject;
return Locator.GetShipBody();
}
protected override OWRigidbody InitRemoteTransform()
{
SectorSync.SetSectorDetector(Locator.GetShipDetector().GetComponent<SectorDetector>());
return QSBWorldSync.GetWorldFromId<QSBShip>(0).AttachedObject;
return Locator.GetShipBody();
}
}
}

View File

@ -1,17 +0,0 @@
using QSB.WorldSync;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace QSB.ShipSync.WorldObjects
{
public class QSBShip : WorldObject<ShipBody>
{
public override void Init(ShipBody ship, int id)
{
ObjectId = id;
AttachedObject = ship;
}
}
}