This commit is contained in:
Regalis
2016-01-27 22:58:30 +02:00
parent 7637bc441f
commit d8149ffaa2
3 changed files with 13 additions and 14 deletions
+4 -7
View File
@@ -278,9 +278,6 @@ namespace Barotrauma
{
Oxygen -= OxygenDetoriationSpeed * deltaTime;
surface = MathHelper.Lerp(surface, GetSurfaceY(), deltaTime * 10.0f);
if (EditWater)
{
Vector2 position = cam.ScreenToWorld(PlayerInput.MousePosition);
@@ -447,13 +444,13 @@ namespace Barotrauma
{
if (renderer.PositionInBuffer > renderer.vertices.Length - 6) return;
////calculate where the surface should be based on the water volume
//calculate where the surface should be based on the water volume
float top = rect.Y+Submarine.DrawPosition.Y;
float bottom = top - rect.Height;
//float surfaceY = bottom + Volume / rect.Width;
float surfaceY = bottom + Volume / rect.Width;
////interpolate the position of the rendered surface towards the "target surface"
//surface = surface + ((surfaceY - Submarine.DrawPosition.Y) - surface) / 10.0f;
//interpolate the position of the rendered surface towards the "target surface"
surface = surface + ((surfaceY - Submarine.DrawPosition.Y) - surface) / 10.0f;
float drawSurface = surface + Submarine.DrawPosition.Y;
Matrix transform = cam.Transform * Matrix.CreateOrthographic(GameMain.GraphicsWidth, GameMain.GraphicsHeight, -1, 1) * 0.5f;
+9 -7
View File
@@ -485,15 +485,17 @@ namespace Barotrauma
if (dummyCharacter.SelectedConstruction != null)
{
if (dummyCharacter.SelectedConstruction == dummyCharacter.ClosestItem)
{
//if (dummyCharacter.SelectedConstruction == dummyCharacter.ClosestItem)
//{
dummyCharacter.SelectedConstruction.DrawHUD(spriteBatch, dummyCharacter);
}
else
{
dummyCharacter.SelectedConstruction = null;
}
//}
//else
//{
// dummyCharacter.SelectedConstruction = null;
//}
if (PlayerInput.KeyHit(InputType.Select) && dummyCharacter.ClosestItem != dummyCharacter.SelectedConstruction) dummyCharacter.SelectedConstruction = null;
}
}
Binary file not shown.