Skip to content
Prev Previous commit
Next Next commit
Fix respawn packing
  • Loading branch information
rexxar-tc committed Oct 2, 2018
commit 838f088b1d3d3df0a8b2f9277ada2b9feda3f8e9
7 changes: 4 additions & 3 deletions Essentials/Patches/SessionDownloadPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private static IEnumerable<MsilInstruction> PatchGetWorld(IEnumerable<MsilInstru

public static MyObjectBuilder_World GetClientWorld(EndpointId sender)
{
MyLog.Default.WriteLineAndConsole($"Preparing world for {sender.Value}...");
Log.Info($"Preparing world for {sender.Value}...");

var ob = new MyObjectBuilder_World()
{
Expand All @@ -87,7 +87,7 @@ public static MyObjectBuilder_World GetClientWorld(EndpointId sender)

private static MyObjectBuilder_Checkpoint GetClientCheckpoint(ulong steamId)
{
MyLog.Default.WriteLineAndConsole($"Saving checkpoint...");
Log.Info($"Saving checkpoint...");
var cpid = new MyObjectBuilder_Checkpoint.PlayerId(steamId);
var ppid = new MyPlayer.PlayerId(steamId);

Expand Down Expand Up @@ -301,9 +301,10 @@ private static MyObjectBuilder_Checkpoint GetClientCheckpoint(ulong steamId)
private static MyObjectBuilder_Sector GetClientSector(ulong steamId)
{
var ob = MySession.Static.GetSector(false);

if (EssentialsPlugin.Instance.Config.PackRespawn)
{
ob.SectorObjects = new List<MyObjectBuilder_EntityBase>();
var grids = new HashSet<MyCubeGrid>();
foreach (var room in MyMedicalRoomsSystem.GetMedicalRoomsInScene())
{
Expand Down