Unstable 0.1500.5.0 (almost forgor edition 💀)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using Barotrauma.Networking;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
partial class AlienRuinMission : Mission
|
||||
{
|
||||
public override void ServerWriteInitial(IWriteMessage msg, Client c)
|
||||
{
|
||||
msg.Write((ushort)existingTargets.Count);
|
||||
foreach (var t in existingTargets)
|
||||
{
|
||||
msg.Write(t != null ? t.ID : Entity.NullEntityID);
|
||||
}
|
||||
msg.Write((ushort)spawnedTargets.Count);
|
||||
foreach (var t in spawnedTargets)
|
||||
{
|
||||
t.WriteSpawnData(msg, t.ID, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,5 +17,10 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
public abstract void ServerWriteInitial(IWriteMessage msg, Client c);
|
||||
|
||||
public virtual void ServerWrite(IWriteMessage msg)
|
||||
{
|
||||
msg.Write((ushort)State);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using Barotrauma.Networking;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
partial class ScanMission : Mission
|
||||
{
|
||||
public override void ServerWriteInitial(IWriteMessage msg, Client c)
|
||||
{
|
||||
msg.Write((ushort)startingItems.Count);
|
||||
foreach (var item in startingItems)
|
||||
{
|
||||
item.WriteSpawnData(msg,
|
||||
item.ID,
|
||||
parentInventoryIDs.ContainsKey(item) ? parentInventoryIDs[item] : Entity.NullEntityID,
|
||||
parentItemContainerIndices.ContainsKey(item) ? parentItemContainerIndices[item] : (byte)0);
|
||||
}
|
||||
ServerWriteScanTargetStatus(msg);
|
||||
}
|
||||
|
||||
public override void ServerWrite(IWriteMessage msg)
|
||||
{
|
||||
base.ServerWrite(msg);
|
||||
ServerWriteScanTargetStatus(msg);
|
||||
}
|
||||
|
||||
private void ServerWriteScanTargetStatus(IWriteMessage msg)
|
||||
{
|
||||
msg.Write((byte)scanTargets.Count);
|
||||
foreach (var kvp in scanTargets)
|
||||
{
|
||||
msg.Write(kvp.Key != null ? kvp.Key.ID : Entity.NullEntityID);
|
||||
msg.Write(kvp.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user