- host can respawn

- respawn info texts
- camera clamped to the the upper edge of the level
- fixed submarinebody being generated from all walls (and not just the ones belonging to that specific sub)
This commit is contained in:
Regalis
2016-06-23 18:23:20 +03:00
parent dc7956274c
commit 296c5a14ed
12 changed files with 204 additions and 74 deletions
+8 -2
View File
@@ -114,6 +114,8 @@ namespace Barotrauma
foreach (Structure wall in Structure.WallList)
{
if (wall.Submarine != submarine) continue;
Rectangle rect = wall.Rect;
FixtureFactory.AttachRectangle(
ConvertUnits.ToSimUnits(rect.Width),
@@ -241,7 +243,11 @@ namespace Barotrauma
ForceTranslate(moveAmount);
if (submarine == Submarine.MainSub) GameMain.GameScreen.Cam.UpdateTransform(false);
if ((Character.Controlled != null && Character.Controlled.Submarine == submarine) ||
(Character.Controlled == null && Submarine.GetClosest(GameMain.GameScreen.Cam.WorldViewCenter) == submarine))
{
GameMain.GameScreen.Cam.UpdateTransform(false);
}
submarine.SetPrevTransform(submarine.Position);
submarine.UpdateTransform();
@@ -296,7 +302,7 @@ namespace Barotrauma
if (Character.Controlled != null) Character.Controlled.CursorPosition += amount;
if ((Character.Controlled != null && Character.Controlled.Submarine == submarine) ||
Submarine.GetClosest(GameMain.GameScreen.Cam.WorldViewCenter) == submarine)
(Character.Controlled == null && Submarine.GetClosest(GameMain.GameScreen.Cam.WorldViewCenter) == submarine))
{
GameMain.GameScreen.Cam.Position += amount;
if (GameMain.GameScreen.Cam.TargetPos != Vector2.Zero) GameMain.GameScreen.Cam.TargetPos += amount;