Merge branch 'master' into new-netcode
Conflicts: Subsurface/Properties/AssemblyInfo.cs Subsurface/Source/Characters/Animation/HumanoidAnimController.cs Subsurface/Source/Characters/Character.cs Subsurface/Source/Items/Components/Door.cs Subsurface/Source/Items/Components/Power/PowerContainer.cs Subsurface/Source/Items/Components/Signal/Wire.cs Subsurface/Source/Items/Item.cs Subsurface/Source/Networking/ChatMessage.cs Subsurface/Source/Networking/GameClient.cs Subsurface/Source/Networking/GameServer.cs Subsurface/Source/Networking/GameServerLogin.cs Subsurface/Source/Networking/GameServerSettings.cs Subsurface/Source/Networking/NetworkMember.cs
This commit is contained in:
@@ -90,7 +90,22 @@ namespace Barotrauma
|
||||
|
||||
Sounds.SoundManager.LowPassHFGain = 1.0f;
|
||||
}
|
||||
|
||||
|
||||
public override void AddToGUIUpdateList()
|
||||
{
|
||||
if (Character.Controlled != null && Character.Controlled.SelectedConstruction != null)
|
||||
{
|
||||
if (Character.Controlled.SelectedConstruction == Character.Controlled.ClosestItem)
|
||||
{
|
||||
Character.Controlled.SelectedConstruction.AddToGUIUpdateList();
|
||||
}
|
||||
}
|
||||
|
||||
if (GameMain.GameSession != null) GameMain.GameSession.AddToGUIUpdateList();
|
||||
|
||||
Character.AddAllToGUIUpdateList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows the game to run logic such as updating the world,
|
||||
/// checking for collisions, gathering input, and playing audio.
|
||||
@@ -117,6 +132,11 @@ namespace Barotrauma
|
||||
}
|
||||
#endif
|
||||
|
||||
foreach (MapEntity e in MapEntity.mapEntityList)
|
||||
{
|
||||
e.IsHighlighted = false;
|
||||
}
|
||||
|
||||
if (GameMain.GameSession != null) GameMain.GameSession.Update((float)deltaTime);
|
||||
|
||||
if (Level.Loaded != null) Level.Loaded.Update((float)deltaTime);
|
||||
@@ -129,7 +149,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
Character.UpdateAll(cam, (float)deltaTime);
|
||||
|
||||
|
||||
BackgroundCreatureManager.Update(cam, (float)deltaTime);
|
||||
|
||||
GameMain.ParticleManager.Update((float)deltaTime);
|
||||
@@ -220,22 +240,6 @@ namespace Barotrauma
|
||||
GameMain.LightManager.UpdateObstructVision(graphics, spriteBatch, cam, Character.Controlled.CursorWorldPosition);
|
||||
}
|
||||
|
||||
List<Submarine> visibleSubs = new List<Submarine>();
|
||||
foreach (Submarine sub in Submarine.Loaded)
|
||||
{
|
||||
Rectangle worldBorders = new Rectangle(
|
||||
sub.Borders.X + (int)sub.WorldPosition.X - 500,
|
||||
sub.Borders.Y + (int)sub.WorldPosition.Y + 500,
|
||||
sub.Borders.Width + 1000,
|
||||
sub.Borders.Height + 1000);
|
||||
|
||||
|
||||
if (Submarine.RectsOverlap(worldBorders, cam.WorldView))
|
||||
{
|
||||
visibleSubs.Add(sub);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
//1. draw the background, characters and the parts of the submarine that are behind them
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user