Build 0.20.11.0

This commit is contained in:
Markus Isberg
2022-12-07 17:40:58 +02:00
parent f5cd0dbd1c
commit a10cc13566
19 changed files with 141 additions and 62 deletions
@@ -694,8 +694,18 @@ namespace Barotrauma
if (ShouldApply(NetFlags.SubList, id, requireUpToDateSave: false))
{
foreach (int ownedSubIndex in ownedSubIndices)
foreach (ushort ownedSubIndex in ownedSubIndices)
{
if (ownedSubIndex >= GameMain.Client.ServerSubmarines.Count)
{
string errorMsg = $"Error in {nameof(MultiPlayerCampaign.ClientRead)}. Owned submarine index was out of bounds. Index: {ownedSubIndex}, submarines: {string.Join(", ", GameMain.Client.ServerSubmarines.Select(s => s.Name))}";
DebugConsole.ThrowError(errorMsg);
GameAnalyticsManager.AddErrorEventOnce(
"MultiPlayerCampaign.ClientRead.OwnerSubIndexOutOfBounds" + ownedSubIndex,
GameAnalyticsManager.ErrorSeverity.Error, errorMsg);
continue;
}
SubmarineInfo sub = GameMain.Client.ServerSubmarines[ownedSubIndex];
if (GameMain.NetLobbyScreen.CheckIfCampaignSubMatches(sub, NetLobbyScreen.SubmarineDeliveryData.Owned))
{