Fix /ascend which was broken since MCForge. (Thanks goodlyay)

This commit is contained in:
UnknownShadow200 2016-03-01 11:44:35 +11:00
parent d92f61698d
commit c9fe3d4a87
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);