(8311f9380) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev
This commit is contained in:
@@ -284,25 +284,22 @@ namespace Barotrauma
|
||||
|
||||
Lights.LightManager.ViewTarget = this;
|
||||
CharacterHUD.Update(deltaTime, this, cam);
|
||||
|
||||
bool removeProgressBars = false;
|
||||
|
||||
foreach (HUDProgressBar progressBar in hudProgressBars.Values)
|
||||
|
||||
if (hudProgressBars.Any())
|
||||
{
|
||||
if (progressBar.FadeTimer <= 0.0f)
|
||||
foreach (var progressBar in hudProgressBars)
|
||||
{
|
||||
removeProgressBars = true;
|
||||
continue;
|
||||
if (progressBar.Value.FadeTimer <= 0.0f)
|
||||
{
|
||||
progressBarRemovals.Add(progressBar);
|
||||
continue;
|
||||
}
|
||||
progressBar.Value.Update(deltaTime);
|
||||
}
|
||||
progressBar.Update(deltaTime);
|
||||
}
|
||||
|
||||
if (removeProgressBars)
|
||||
{
|
||||
// TODO: this generates garbage, can we fix anything here?
|
||||
foreach (var pb in hudProgressBars.Where(pb => pb.Value.FadeTimer <= 0.0f).ToList())
|
||||
if (progressBarRemovals.Any())
|
||||
{
|
||||
hudProgressBars.Remove(pb.Key);
|
||||
progressBarRemovals.ForEach(pb => hudProgressBars.Remove(pb.Key));
|
||||
progressBarRemovals.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +198,6 @@ namespace Barotrauma
|
||||
|
||||
private void FindTargetHulls()
|
||||
{
|
||||
var idCard = character.Inventory.FindItemByIdentifier("idcard");
|
||||
bool isCurrentHullOK = !HumanAIController.UnsafeHulls.Contains(character.CurrentHull) && !IsForbidden(character.CurrentHull);
|
||||
|
||||
targetHulls.Clear();
|
||||
|
||||
Reference in New Issue
Block a user