From c77d568b945f0a087e6106a202dd4fbfe9a6d6f4 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 17 Sep 2016 10:42:45 +1000 Subject: [PATCH] Games: Fix /countdown generate with 64x64x64 being impossible to lose on. --- Games/Countdown/CountdownGame.cs | 5 ++--- Games/Countdown/CountdownMapGen.cs | 4 ++-- Levels/Level.Physics.cs | 6 ++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Games/Countdown/CountdownGame.cs b/Games/Countdown/CountdownGame.cs index 766953db5..6ed5eb48e 100644 --- a/Games/Countdown/CountdownGame.cs +++ b/Games/Countdown/CountdownGame.cs @@ -67,9 +67,8 @@ namespace MCGalaxy.Games { } squaresLeft.Clear(); - int maxX = mapon.Width - 1, maxZ = mapon.Length - 1; - for(int zz = 6; zz < maxZ - 6; zz += 3) - for (int xx = 6; xx < maxX - 6; xx += 3) + for(int zz = 6; zz < mapon.Length - 6; zz += 3) + for (int xx = 6; xx < mapon.Width - 6; xx += 3) squaresLeft.Add(new SquarePos(xx, zz)); if (freezemode) diff --git a/Games/Countdown/CountdownMapGen.cs b/Games/Countdown/CountdownMapGen.cs index ae3729b96..2998a8208 100644 --- a/Games/Countdown/CountdownMapGen.cs +++ b/Games/Countdown/CountdownMapGen.cs @@ -105,8 +105,8 @@ namespace MCGalaxy.Games { static void MakeSquares(Level lvl) { int maxX = lvl.Width - 1, maxY = lvl.Height - 1, maxZ = lvl.Length - 1; Cuboid(4, 4, 4, maxX - 4, 4, maxZ - 4, Block.glass, lvl); - for(int zz = 6; zz < maxZ - 6; zz += 3) - for (int xx = 6; xx < maxX - 6; xx += 3) + for(int zz = 6; zz < lvl.Length - 6; zz += 3) + for (int xx = 6; xx < lvl.Width - 6; xx += 3) Cuboid(xx, 4, zz, xx + 1, 4, zz + 1, Block.green, lvl); } diff --git a/Levels/Level.Physics.cs b/Levels/Level.Physics.cs index 3f0777a03..95fa3b0e7 100644 --- a/Levels/Level.Physics.cs +++ b/Levels/Level.Physics.cs @@ -74,10 +74,8 @@ namespace MCGalaxy { TimeSpan delta = DateTime.UtcNow - start; wait = speedPhysics - (int)delta.TotalMilliseconds; - if (wait < (int)(-overload * 0.75f)) - { - if (wait < -overload) - { + if (wait < (int)(-overload * 0.75f)) { + if (wait < -overload) { if (!Server.physicsRestart) setPhysics(0); ClearPhysics();