From c9fe3d4a87d3d1a2790dbe1cda9f8ec6e73766ed Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Tue, 1 Mar 2016 11:44:35 +1100 Subject: [PATCH 1/2] Fix /ascend which was broken since MCForge. (Thanks goodlyay) --- Commands/other/CmdAscend.cs | 2 +- Levels/Generator/RealisticMapGen.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Commands/other/CmdAscend.cs b/Commands/other/CmdAscend.cs index 6ac8d28e7..604852992 100644 --- a/Commands/other/CmdAscend.cs +++ b/Commands/other/CmdAscend.cs @@ -31,7 +31,7 @@ namespace MCGalaxy.Commands public override void Use(Player p, string message) { - ushort max = p.level.Length; + ushort max = p.level.Height; ushort posy = (ushort)(p.pos[1] / 32); bool found = false; ushort xpos = (ushort)(p.pos[0] / 32); diff --git a/Levels/Generator/RealisticMapGen.cs b/Levels/Generator/RealisticMapGen.cs index ae3bb6f94..94fd1d713 100644 --- a/Levels/Generator/RealisticMapGen.cs +++ b/Levels/Generator/RealisticMapGen.cs @@ -305,11 +305,11 @@ namespace MCGalaxy { } //Forces the edge of a map to slope lower for island map types - float NegateEdge(ushort x, ushort y, Level Lvl) { + float NegateEdge(ushort x, ushort z, Level Lvl) { float tempx = 0.0f, tempy = 0.0f; float temp; if (x != 0) { tempx = ((float)x / (float)Lvl.Width) * 0.5f; } - if (y != 0) { tempy = ((float)y / (float)Lvl.Length) * 0.5f; } + if (z != 0) { tempy = ((float)z / (float)Lvl.Length) * 0.5f; } tempx = Math.Abs(tempx - 0.25f); tempy = Math.Abs(tempy - 0.25f); From 738a970778fd0ff83d360a8f3edef7b601f58d98 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 3 Mar 2016 16:24:26 +1100 Subject: [PATCH 2/2] Fix first character not showing up in MOTD. (Thanks goodlyay) --- Network/Player.Networking.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Network/Player.Networking.cs b/Network/Player.Networking.cs index 6046d6e07..58efc60b7 100644 --- a/Network/Player.Networking.cs +++ b/Network/Player.Networking.cs @@ -285,7 +285,7 @@ namespace MCGalaxy { else NetUtils.WriteAscii(Server.motd, buffer, 66); } else { - NetUtils.WriteAscii(level.motd, buffer, 1); + NetUtils.WriteAscii(level.motd, buffer, 2); if (level.motd.Length > 64) NetUtils.WriteAscii(level.motd.Substring(64), buffer, 66); }