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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user