(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;
|
Lights.LightManager.ViewTarget = this;
|
||||||
CharacterHUD.Update(deltaTime, this, cam);
|
CharacterHUD.Update(deltaTime, this, cam);
|
||||||
|
|
||||||
bool removeProgressBars = false;
|
if (hudProgressBars.Any())
|
||||||
|
|
||||||
foreach (HUDProgressBar progressBar in hudProgressBars.Values)
|
|
||||||
{
|
{
|
||||||
if (progressBar.FadeTimer <= 0.0f)
|
foreach (var progressBar in hudProgressBars)
|
||||||
{
|
{
|
||||||
removeProgressBars = true;
|
if (progressBar.Value.FadeTimer <= 0.0f)
|
||||||
continue;
|
{
|
||||||
|
progressBarRemovals.Add(progressBar);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
progressBar.Value.Update(deltaTime);
|
||||||
}
|
}
|
||||||
progressBar.Update(deltaTime);
|
if (progressBarRemovals.Any())
|
||||||
}
|
|
||||||
|
|
||||||
if (removeProgressBars)
|
|
||||||
{
|
|
||||||
// TODO: this generates garbage, can we fix anything here?
|
|
||||||
foreach (var pb in hudProgressBars.Where(pb => pb.Value.FadeTimer <= 0.0f).ToList())
|
|
||||||
{
|
{
|
||||||
hudProgressBars.Remove(pb.Key);
|
progressBarRemovals.ForEach(pb => hudProgressBars.Remove(pb.Key));
|
||||||
|
progressBarRemovals.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,6 @@ namespace Barotrauma
|
|||||||
|
|
||||||
private void FindTargetHulls()
|
private void FindTargetHulls()
|
||||||
{
|
{
|
||||||
var idCard = character.Inventory.FindItemByIdentifier("idcard");
|
|
||||||
bool isCurrentHullOK = !HumanAIController.UnsafeHulls.Contains(character.CurrentHull) && !IsForbidden(character.CurrentHull);
|
bool isCurrentHullOK = !HumanAIController.UnsafeHulls.Contains(character.CurrentHull) && !IsForbidden(character.CurrentHull);
|
||||||
|
|
||||||
targetHulls.Clear();
|
targetHulls.Clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user