Unstable v0.1300.0.0 (February 19th 2021)

This commit is contained in:
Joonas Rikkonen
2021-02-25 13:44:23 +02:00
parent b772654326
commit 24cbef485a
441 changed files with 21343 additions and 8562 deletions
@@ -108,7 +108,7 @@ namespace Barotrauma
}
//achievement for descending ridiculously deep
float realWorldDepth = Math.Abs(sub.Position.Y - Level.Loaded.Size.Y) * Physics.DisplayToRealWorldRatio;
float realWorldDepth = sub.RealWorldDepth;
if (realWorldDepth > 5000.0f && Timing.TotalTime > GameMain.GameSession.RoundStartTime + 30.0f)
{
//all conscious characters inside the sub get an achievement
@@ -333,24 +333,24 @@ namespace Barotrauma
if (GameMain.NetworkMember != null && GameMain.NetworkMember.IsClient) { return; }
if (gameSession.Mission != null)
foreach (Mission mission in gameSession.Missions)
{
if (gameSession.Mission is CombatMission combatMission && GameMain.GameSession.WinningTeam.HasValue)
if (mission is CombatMission combatMission && GameMain.GameSession.WinningTeam.HasValue)
{
//all characters that are alive and in the winning team get an achievement
UnlockAchievement(gameSession.Mission.Prefab.AchievementIdentifier + (int)GameMain.GameSession.WinningTeam, true,
UnlockAchievement(mission.Prefab.AchievementIdentifier + (int)GameMain.GameSession.WinningTeam, true,
c => c != null && !c.IsDead && !c.IsUnconscious && combatMission.IsInWinningTeam(c));
}
else if (gameSession.Mission.Completed)
else if (mission.Completed)
{
//all characters get an achievement
if (GameMain.NetworkMember != null && GameMain.NetworkMember.IsServer)
{
UnlockAchievement(gameSession.Mission.Prefab.AchievementIdentifier, true, c => c != null);
UnlockAchievement(mission.Prefab.AchievementIdentifier, true, c => c != null);
}
else
{
UnlockAchievement(gameSession.Mission.Prefab.AchievementIdentifier);
UnlockAchievement(mission.Prefab.AchievementIdentifier);
}
}
}
@@ -380,7 +380,7 @@ namespace Barotrauma
#endif
var charactersInSub = Character.CharacterList.FindAll(c =>
!c.IsDead &&
c.TeamID != Character.TeamType.FriendlyNPC &&
c.TeamID != CharacterTeamType.FriendlyNPC &&
!(c.AIController is EnemyAIController) &&
(c.Submarine == gameSession.Submarine || (Level.Loaded?.EndOutpost != null && c.Submarine == Level.Loaded.EndOutpost)));