38f1ddb...178a853: v0.8.9.1, removed content folder

This commit is contained in:
Joonas Rikkonen
2019-03-18 19:46:58 +02:00
parent 38f1ddb6fe
commit 6c0679c297
1054 changed files with 151673 additions and 144931 deletions
@@ -11,10 +11,11 @@ namespace Barotrauma.Networking
ComponentState,
InventoryState,
Status,
Repair,
Treatment,
ApplyStatusEffect,
ChangeProperty,
Control
Control,
UpdateSkills
}
public readonly Entity Entity;
@@ -37,7 +37,7 @@ namespace Barotrauma.Networking
//write an empty event to avoid messing up IDs
//(otherwise the clients might read the next event in the message and think its ID
//is consecutive to the previous one, even though we skipped over this broken event)
tempBuffer.Write((UInt16)0);
tempBuffer.Write(Entity.NullEntityID);
tempBuffer.WritePadBits();
eventCount++;
continue;
@@ -67,7 +67,7 @@ namespace Barotrauma.Networking
{
//technically the clients don't have any use for these, but removing events and shifting the IDs of all
//consecutive ones is so error-prone that I think this is a safer option
tempBuffer.Write((UInt16)0);
tempBuffer.Write(Entity.NullEntityID);
tempBuffer.WritePadBits();
}*/
else
@@ -88,10 +88,7 @@ namespace Barotrauma.Networking
msg.Write(tempBuffer);
}
}
protected virtual void WriteEvent(NetBuffer buffer, NetEntityEvent entityEvent, Client recipient = null)
{
throw new NotImplementedException();
}
protected abstract void WriteEvent(NetBuffer buffer, NetEntityEvent entityEvent, Client recipient = null);
}
}
@@ -75,7 +75,7 @@ namespace Barotrauma.Networking
return;
}
if (((Entity)entity).Removed)
if (((Entity)entity).Removed && !(entity is Level))
{
DebugConsole.ThrowError("Can't create an entity event for " + entity + " - the entity has been removed.\n"+Environment.StackTrace);
return;
@@ -338,7 +338,7 @@ namespace Barotrauma.Networking
UInt16 thisEventID = (UInt16)(firstEventID + (UInt16)i);
UInt16 entityID = msg.ReadUInt16();
if (entityID == 0)
if (entityID == Entity.NullEntityID)
{
msg.ReadPadBits();
if (thisEventID == (UInt16)(sender.LastSentEntityEventID + 1)) sender.LastSentEntityEventID++;