OBT/1.1.1 (#51)
Reverted an outdated change which is no longer in use Removed CL-EP install command due to partical system issues
This commit is contained in:
@@ -1317,10 +1317,14 @@ namespace Barotrauma
|
||||
GameMain.LuaCs.ToggleDebugger(port);
|
||||
}));
|
||||
|
||||
/*
|
||||
commands.Add(new Command("install_cl_ep", "Installs Client-Side ProjectEP into your client.", (string[] args) =>
|
||||
{
|
||||
LuaCsInstaller.Install();
|
||||
}));
|
||||
*/
|
||||
// Removed due to critical partical issues
|
||||
// TODO: Partical manager requires a refactor to solve race condition
|
||||
|
||||
commands.Add(new Command("randomizeseed", "randomizeseed: Toggles level seed randomization on/off.", (string[] args) =>
|
||||
{
|
||||
|
||||
@@ -2,17 +2,16 @@
|
||||
using Barotrauma.IO;
|
||||
using Barotrauma.Items.Components;
|
||||
using Barotrauma.Networking;
|
||||
using Barotrauma.PerkBehaviors;
|
||||
using FarseerPhysics;
|
||||
using FarseerPhysics.Dynamics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using Barotrauma.PerkBehaviors;
|
||||
using Voronoi2;
|
||||
|
||||
namespace Barotrauma
|
||||
@@ -509,16 +508,23 @@ namespace Barotrauma
|
||||
return dockedBorders;
|
||||
}
|
||||
|
||||
private readonly ConcurrentBag<Submarine> connectedSubs;
|
||||
private readonly HashSet<Submarine> connectedSubs;
|
||||
/// <summary>
|
||||
/// Returns a list of all submarines that are connected to this one via docking ports, including this sub.
|
||||
/// </summary>
|
||||
public ConcurrentBag<Submarine> GetConnectedSubs()
|
||||
public IEnumerable<Submarine> GetConnectedSubs()
|
||||
{
|
||||
return connectedSubs;
|
||||
}
|
||||
|
||||
private void GetConnectedSubsRecursive(ConcurrentBag<Submarine> subs)
|
||||
public void RefreshConnectedSubs()
|
||||
{
|
||||
connectedSubs.Clear();
|
||||
connectedSubs.Add(this);
|
||||
GetConnectedSubsRecursive(connectedSubs);
|
||||
}
|
||||
|
||||
private void GetConnectedSubsRecursive(HashSet<Submarine> subs)
|
||||
{
|
||||
foreach (Submarine dockedSub in DockedTo)
|
||||
{
|
||||
@@ -528,12 +534,6 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public void RefreshConnectedSubs()
|
||||
{
|
||||
connectedSubs.Clear();
|
||||
connectedSubs.Add(this);
|
||||
GetConnectedSubsRecursive(connectedSubs);
|
||||
}
|
||||
/// <summary>
|
||||
/// Attempt to find a spawn position close to the specified position where the sub doesn't collide with walls/ruins
|
||||
/// </summary>
|
||||
@@ -1551,7 +1551,6 @@ namespace Barotrauma
|
||||
if (includingConnectedSubs)
|
||||
{
|
||||
// Performance-sensitive code -> implemented without Linq.
|
||||
|
||||
foreach (Submarine s in connectedSubs)
|
||||
{
|
||||
if (s == entity.Submarine && (allowDifferentTeam || entity.Submarine.TeamID == TeamID) && (allowDifferentType || entity.Submarine.Info.Type == Info.Type))
|
||||
@@ -1643,7 +1642,7 @@ namespace Barotrauma
|
||||
{
|
||||
Stopwatch sw = Stopwatch.StartNew();
|
||||
|
||||
connectedSubs = new ConcurrentBag<Submarine>
|
||||
connectedSubs = new HashSet<Submarine>(2)
|
||||
{
|
||||
this
|
||||
};
|
||||
@@ -1830,7 +1829,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (Screen.Selected is { IsEditor: false })
|
||||
if (Screen.Selected is { IsEditor : false })
|
||||
{
|
||||
foreach (Identifier layer in Info.LayersHiddenByDefault)
|
||||
{
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace Barotrauma
|
||||
GameMain.PerformanceCounter.AddElapsedTicks("Update:GameSession", sw.ElapsedTicks);
|
||||
sw.Restart();
|
||||
|
||||
GameMain.ParticleManager.Update((float)deltaTime);
|
||||
GameMain.ParticleManager?.Update((float)deltaTime);
|
||||
|
||||
sw.Stop();
|
||||
GameMain.PerformanceCounter.AddElapsedTicks("Update:Particle", sw.ElapsedTicks);
|
||||
|
||||
Reference in New Issue
Block a user