Fixed clients not being notified when a campaign is exited and a new one started, causing them to think they still have up-to-date save files for the new campaign and get kicked out due to desync as soon as a round starts. (See #315)
This commit is contained in:
@@ -605,7 +605,19 @@ namespace Barotrauma.Networking
|
||||
c.LastRecvCampaignSave = inc.ReadUInt16();
|
||||
if (c.LastRecvCampaignSave > 0)
|
||||
{
|
||||
byte campaignID = inc.ReadByte();
|
||||
c.LastRecvCampaignUpdate = inc.ReadUInt16();
|
||||
|
||||
if (GameMain.GameSession?.GameMode is MultiplayerCampaign)
|
||||
{
|
||||
//the client has a campaign save for another campaign
|
||||
//(the server started a new campaign and the client isn't aware of it yet?)
|
||||
if (((MultiplayerCampaign)GameMain.GameSession.GameMode).CampaignID != campaignID)
|
||||
{
|
||||
c.LastRecvCampaignSave = 0;
|
||||
c.LastRecvCampaignUpdate = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ClientNetObject.CHAT_MESSAGE:
|
||||
|
||||
Reference in New Issue
Block a user