Remove items in dummycharacter inventory in editmapscreen, important character updates a separate networkeventtype
This commit is contained in:
@@ -266,8 +266,9 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
}
|
||||
|
||||
catch
|
||||
{
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError("Error while connecting to server", e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -354,7 +355,7 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
else if (gameStarted)
|
||||
{
|
||||
new NetworkEvent(myCharacter.ID, true);
|
||||
myCharacter.CreateUpdateNetworkEvent(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -302,16 +302,15 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
if (gameStarted)
|
||||
{
|
||||
if (myCharacter != null) new NetworkEvent(myCharacter.ID, true);
|
||||
if (myCharacter != null) myCharacter.CreateUpdateNetworkEvent(false);
|
||||
|
||||
foreach (Character c in Character.CharacterList)
|
||||
{
|
||||
if (c as AICharacter == null) continue;
|
||||
|
||||
if (c.SimPosition == Vector2.Zero || c.SimPosition.Length() < 100.0f)
|
||||
{
|
||||
new NetworkEvent(c.ID, false);
|
||||
}
|
||||
if (c.SimPosition.Length() > 100.0f) continue;
|
||||
|
||||
c.CreateUpdateNetworkEvent(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace Barotrauma.Networking
|
||||
//if the ragdoll is closer than this, don't try to correct its position
|
||||
public const float AllowedRagdollDistance = 0.1f;
|
||||
|
||||
public const float LargeCharacterUpdateInterval = 5.0f;
|
||||
|
||||
public const float DeleteDisconnectedTime = 10.0f;
|
||||
|
||||
public const float AckInterval = 0.2f;
|
||||
|
||||
@@ -18,8 +18,7 @@ namespace Barotrauma.Networking
|
||||
PickItem = 6,
|
||||
DropItem = 7,
|
||||
InventoryUpdate = 8,
|
||||
|
||||
|
||||
|
||||
UpdateProperty = 9,
|
||||
WallDamage = 10,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user