(98ad00fa2) v0.9.1.0

This commit is contained in:
Joonas Rikkonen
2019-07-10 13:52:12 +03:00
parent 2a791887ed
commit afa2137bd2
104 changed files with 3041 additions and 3134 deletions
@@ -10,7 +10,7 @@ namespace Barotrauma.Networking
class ServerEntityEvent : NetEntityEvent
{
private IServerSerializable serializable;
#if DEBUG
public string StackTrace;
#endif
@@ -21,11 +21,10 @@ namespace Barotrauma.Networking
get { return createTime; }
}
public ServerEntityEvent(IServerSerializable entity, UInt16 id)
: base(entity, id)
public ServerEntityEvent(IServerSerializable serializableEntity, UInt16 id)
: base(serializableEntity, id)
{
serializable = entity;
serializable = serializableEntity;
createTime = Timing.TotalTime;
#if DEBUG
@@ -292,6 +291,11 @@ namespace Barotrauma.Networking
bufferedEvents.Add(bufferedEvent);
}
public void RefreshEntityIDs()
{
events.ForEach(e => e.RefreshEntityID());
uniqueEvents.ForEach(e => e.RefreshEntityID());
}
/// <summary>
/// Writes all the events that the client hasn't received yet into the outgoing message