Unstable 0.14.6.0

This commit is contained in:
Markus Isberg
2021-06-17 13:31:36 +03:00
parent 23a7c37eee
commit ee5308b39f
11 changed files with 40 additions and 13 deletions

View File

@@ -358,9 +358,9 @@ namespace Barotrauma
int attackLimbIndex = msg.ReadByte();
UInt16 targetEntityID = msg.ReadUInt16();
int targetLimbIndex = msg.ReadByte();
Vector2 targetSimPos = new Vector2(msg.ReadSingle(), msg.ReadSingle());
//255 = entity already removed, no need to do anything
if (attackLimbIndex == 255 || Removed) { break; }
Vector2 targetSimPos = new Vector2(msg.ReadSingle(), msg.ReadSingle());
if (attackLimbIndex >= AnimController.Limbs.Length)
{
DebugConsole.ThrowError($"Received invalid SetAttack/ExecuteAttack message. Limb index out of bounds (character: {Name}, limb index: {attackLimbIndex}, limb count: {AnimController.Limbs.Length})");

View File

@@ -988,15 +988,21 @@ namespace Barotrauma.Networking
string errorMsg = $"Mission equality check failed. Mission count doesn't match the server (server: {missionCount}, client: {GameMain.GameSession.Missions.Count()})";
throw new Exception(errorMsg);
}
foreach (Mission mission in GameMain.GameSession.Missions)
List<string> serverMissionIdentifiers = new List<string>();
for (int i = 0; i < missionCount; i++)
{
string missionIdentifier = inc.ReadString() ?? "";
if (missionIdentifier != mission.Prefab.Identifier)
serverMissionIdentifiers.Add(inc.ReadString() ?? "");
}
if (missionCount > 0)
{
if (!GameMain.GameSession.Missions.Select(m => m.Prefab.Identifier).OrderBy(id => id).SequenceEqual(serverMissionIdentifiers.OrderBy(id => id)))
{
string errorMsg = $"Mission equality check failed. The mission selected at your end doesn't match the one loaded by the server (server: {missionIdentifier ?? "null"}, client: {mission.Prefab.Identifier})";
string errorMsg = $"Mission equality check failed. The mission selected at your end doesn't match the one loaded by the server (server: {string.Join(", ", serverMissionIdentifiers)}, client: {string.Join(", ", GameMain.GameSession.Missions.Select(m => m.Prefab.Identifier))})";
GameAnalyticsManager.AddErrorEventOnce("GameClient.StartGame:MissionsDontMatch" + Level.Loaded.Seed, GameAnalyticsSDK.Net.EGAErrorSeverity.Error, errorMsg);
throw new Exception(errorMsg);
}
GameMain.GameSession.EnforceMissionOrder(serverMissionIdentifiers);
}
byte equalityCheckValueCount = inc.ReadByte();

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.14.5.0</Version>
<Version>0.14.6.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.14.5.0</Version>
<Version>0.14.6.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.14.5.0</Version>
<Version>0.14.6.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.14.5.0</Version>
<Version>0.14.6.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.14.5.0</Version>
<Version>0.14.6.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>

View File

@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product>
<Version>0.14.5.0</Version>
<Version>0.14.6.0</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName>

View File

@@ -294,7 +294,7 @@ namespace Barotrauma
else
{
Random rand = new MTRandom(ToolBox.StringToInt(levelData.Seed));
var huntingGroundsMissionPrefab = ToolBox.SelectWeightedRandom(huntingGroundsMissionPrefabs, huntingGroundsMissionPrefabs.Select(p => (float)p.Commonness).ToList(), rand);
var huntingGroundsMissionPrefab = ToolBox.SelectWeightedRandom(huntingGroundsMissionPrefabs, huntingGroundsMissionPrefabs.Select(p => (float)Math.Max(p.Commonness, 0.1f)).ToList(), rand);
if (!Missions.Any(m => m.Prefab.Tags.Any(t => t.Equals("huntinggrounds", StringComparison.OrdinalIgnoreCase))))
{
extraMissions.Add(huntingGroundsMissionPrefab.Instantiate(Map.SelectedConnection.Locations, Submarine.MainSub));

View File

@@ -640,6 +640,18 @@ namespace Barotrauma
return missions.IndexOf(mission);
}
public void EnforceMissionOrder(List<string> missionIdentifiers)
{
List<Mission> sortedMissions = new List<Mission>();
foreach (string missionId in missionIdentifiers)
{
var matchingMission = missions.Find(m => m.Prefab.Identifier == missionId);
sortedMissions.Add(matchingMission);
missions.Remove(matchingMission);
}
missions.AddRange(sortedMissions);
}
partial void UpdateProjSpecific(float deltaTime);
public void EndRound(string endMessage, List<TraitorMissionResult> traitorResults = null, CampaignMode.TransitionType transitionType = CampaignMode.TransitionType.None)

View File

@@ -1,3 +1,13 @@
---------------------------------------------------------------------------------------------------------
v0.14.6.0
---------------------------------------------------------------------------------------------------------
- Fixed "entity not found" errors when receiving attack data for a character that's been removed (most often a terminal cell).
- Fixed occasional "mission equality check failed" errors when starting a round with multiple missions selected.
- Fixed outpost events not triggering in levels with a difficulty between 40-41.
- Fixed hunting grounds missions only spawning endworms.
- Fixed 2nd part of the Jacov Subra event chain not triggering.
---------------------------------------------------------------------------------------------------------
v0.14.5.0
---------------------------------------------------------------------------------------------------------
@@ -70,7 +80,6 @@ Changes:
- Allow clicking on the main menu buttons when the credits are open.
- Option to adjust motion sensor's update interval in the sub editor.
Fixes:
- Fixed clients timing out at the start of a multiplayer round if loading the campaign save takes more than 30 seconds.
- Fixed previous missions still being available in outposts that have become abandoned due to radiation.