(99feac023) Unstable 0.9.704.0
This commit is contained in:
@@ -1783,6 +1783,17 @@ namespace Barotrauma.Networking
|
||||
|
||||
if (campaign != null)
|
||||
{
|
||||
if (campaign.Map == null)
|
||||
{
|
||||
throw new Exception("Campaign map was null.");
|
||||
}
|
||||
if (campaign.Map.SelectedConnection == null)
|
||||
{
|
||||
//this should not happen, there should always be some destination selected
|
||||
DebugConsole.ThrowError("No connection between locations was selected when starting the round. Choosing a random location...");
|
||||
campaign.Map.SelectRandomLocation(preferUndiscovered: true);
|
||||
}
|
||||
|
||||
GameMain.GameSession.StartRound(campaign.Map.SelectedConnection.Level,
|
||||
reloadSub: true,
|
||||
loadSecondSub: teamCount > 1,
|
||||
@@ -2007,6 +2018,8 @@ namespace Barotrauma.Networking
|
||||
|
||||
serverSettings.WriteMonsterEnabled(msg);
|
||||
|
||||
GameMain.GameSession.Mission?.ServerWriteInitial(msg, client);
|
||||
|
||||
serverPeer.Send(msg, client.Connection, DeliveryMethod.Reliable);
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -20,6 +20,11 @@ namespace Barotrauma.Networking
|
||||
get { return createTime; }
|
||||
}
|
||||
|
||||
public void ResetCreateTime()
|
||||
{
|
||||
createTime = Timing.TotalTime;
|
||||
}
|
||||
|
||||
public ServerEntityEvent(IServerSerializable serializableEntity, UInt16 id)
|
||||
: base(serializableEntity, id)
|
||||
{
|
||||
@@ -223,6 +228,7 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
lastWarningTime = Timing.TotalTime;
|
||||
GameServer.Log("WARNING: ServerEntityEventManager is lagging behind! Last sent id: " + lastSentToAnyone.ToString() + ", latest create id: " + ID.ToString(), ServerLog.MessageType.ServerMessage);
|
||||
events.ForEach(e => e.ResetCreateTime());
|
||||
//TODO: reset clients if this happens, maybe do it if a majority are behind rather than all of them?
|
||||
}
|
||||
|
||||
|
||||
@@ -175,6 +175,7 @@ namespace Barotrauma.Networking
|
||||
GameMain.NetworkMember?.KarmaManager?.SaveCustomPreset();
|
||||
GameMain.NetworkMember?.KarmaManager?.Save();
|
||||
}
|
||||
SaveSettings();
|
||||
GameMain.NetLobbyScreen.LastUpdateID++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user