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
+6 -6
View File
@@ -35,13 +35,13 @@ namespace Barotrauma
for (int i = 0; i < amount; i++)
{
Vector2 position = (randomWayPoint == null) ? Vector2.Zero : FarseerPhysics.ConvertUnits.ToSimUnits(randomWayPoint.Position + Level.Loaded.Position);
Vector2 position = (randomWayPoint == null) ? Vector2.Zero : FarseerPhysics.ConvertUnits.ToSimUnits(randomWayPoint.Position);
if (spawnDeep)
{
position.Y = FarseerPhysics.ConvertUnits.ToSimUnits(Level.Loaded.Position.Y);
}
//!!!!!!!!!!!!!!!!!!
//if (spawnDeep)
//{
// position.Y = FarseerPhysics.ConvertUnits.ToSimUnits(Level.Loaded.Position.Y);
//}
position.X += Rand.Range(-0.5f, 0.5f);
position.Y += Rand.Range(-0.5f, 0.5f);