- fixed camera "twitching" when trying to move it above the upper limit of the level
- fixed duplicate hulls/gaps being placed at docking ports when saving and loading - fixed linkedsubmarines moving when saving and reloading if the center of the wall vertices isn't he same as the center of the sub - moving docked submarines along with the main sub when syncing the position - characters are killed when the client controlling them disconnects (+ cause of death: disconnected) - fixed the description box in server lobby
This commit is contained in:
@@ -342,14 +342,14 @@ namespace Barotrauma
|
||||
|
||||
private void DrawSubmarineIndicator(SpriteBatch spriteBatch, Submarine submarine)
|
||||
{
|
||||
Vector2 subDiff = submarine.WorldPosition - cam.Position;
|
||||
Vector2 subDiff = submarine.WorldPosition - cam.WorldViewCenter;
|
||||
|
||||
if (Math.Abs(subDiff.X) > cam.WorldView.Width || Math.Abs(subDiff.Y) > cam.WorldView.Height)
|
||||
{
|
||||
Vector2 normalizedSubDiff = Vector2.Normalize(subDiff);
|
||||
|
||||
Vector2 iconPos =
|
||||
cam.WorldToScreen(cam.Position) +
|
||||
cam.WorldToScreen(cam.WorldViewCenter) +
|
||||
new Vector2(normalizedSubDiff.X * GameMain.GraphicsWidth * 0.4f, -normalizedSubDiff.Y * GameMain.GraphicsHeight * 0.4f);
|
||||
|
||||
GUI.SubmarineIcon.Draw(spriteBatch, iconPos, Color.LightBlue * 0.5f);
|
||||
|
||||
Reference in New Issue
Block a user