Unstable 1.1.14.0

This commit is contained in:
Markus Isberg
2023-10-02 16:43:54 +03:00
parent 94f5a93a0c
commit cf8f0de659
606 changed files with 21906 additions and 11456 deletions
@@ -162,26 +162,25 @@ namespace Barotrauma
sw.Stop();
GameMain.PerformanceCounter.AddElapsedTicks("Update:Level", sw.ElapsedTicks);
if (Character.Controlled != null)
if (Character.Controlled is { } controlled)
{
if (Character.Controlled.SelectedItem != null && Character.Controlled.CanInteractWith(Character.Controlled.SelectedItem))
if (controlled.SelectedItem != null && controlled.CanInteractWith(controlled.SelectedItem))
{
Character.Controlled.SelectedItem.UpdateHUD(cam, Character.Controlled, (float)deltaTime);
controlled.SelectedItem.UpdateHUD(cam, controlled, (float)deltaTime);
}
if (Character.Controlled.Inventory != null)
if (controlled.Inventory != null)
{
foreach (Item item in Character.Controlled.Inventory.AllItems)
foreach (Item item in controlled.Inventory.AllItems)
{
if (Character.Controlled.HasEquippedItem(item))
if (controlled.HasEquippedItem(item))
{
item.UpdateHUD(cam, Character.Controlled, (float)deltaTime);
item.UpdateHUD(cam, controlled, (float)deltaTime);
}
}
}
}
sw.Restart();
sw.Restart();
Character.UpdateAll((float)deltaTime, cam);
#elif SERVER