Very unfinished attempt at changing the coordinate system to work relative to the level and to move the sub instead of the whole level

This commit is contained in:
Regalis
2015-12-03 19:42:11 +02:00
parent 5bcdfa2b56
commit c064c5eb50
14 changed files with 278 additions and 269 deletions

View File

@@ -59,7 +59,7 @@ namespace Barotrauma
this.position = position;
drawPosition = position + Level.Loaded.Position;
drawPosition = position;
steeringManager = new SteeringManager(this);
@@ -153,7 +153,7 @@ namespace Barotrauma
if (velocity.X < 0.0f) rotation -= MathHelper.Pi;
}
if (Level.Loaded != null) drawPosition = position + Level.Loaded.Position;
if (Level.Loaded != null) drawPosition = position;// +Level.Loaded.Position;
if (depth > 0.0f)
{

View File

@@ -889,7 +889,7 @@ namespace Barotrauma
if (Submarine.Loaded!=null && Level.Loaded !=null)
{
protectedFromPressure = protectedFromPressure && (Position-Level.Loaded.Position).Y > SubmarineBody.DamageDepth;
protectedFromPressure = protectedFromPressure && Position.Y > SubmarineBody.DamageDepth;
}
if (!protectedFromPressure &&