Fixed timestep for some GUI & input code
Fixed timestep only applied to the physics simulation, but input and GUI updates were not being handled properly, so here's some progress into fixing them.
This commit is contained in:
@@ -338,6 +338,11 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
|
||||
public override void DrawHUD(SpriteBatch spriteBatch, Character character)
|
||||
{
|
||||
GuiFrame.Draw(spriteBatch);
|
||||
}
|
||||
|
||||
public override void UpdateHUD(Character character)
|
||||
{
|
||||
FabricableItem targetItem = itemList.SelectedData as FabricableItem;
|
||||
if (targetItem != null)
|
||||
@@ -346,7 +351,6 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
|
||||
GuiFrame.Update((float)Physics.step);
|
||||
GuiFrame.Draw(spriteBatch);
|
||||
}
|
||||
|
||||
private bool CanBeFabricated(FabricableItem fabricableItem, Character user)
|
||||
|
||||
Reference in New Issue
Block a user