Skip to content
Permalink
Browse files

Fix relative /tp always moving you up a block or two

  • Loading branch information...
UnknownShadow200 committed Sep 28, 2017
1 parent 7b3e796 commit 0282666e65d27b8d08bde591d9b2bf46c1240160
Showing with 5 additions and 4 deletions.
  1. +3 −3 fCraft/Commands/ModerationCommands.cs
  2. +1 −1 fCraft/Commands/ZoneCommands.cs
  3. +1 −0 fCraft/Player/Position.cs
@@ -1466,9 +1466,9 @@ static void UnfreezeHandler(Player player, CommandReader cmd)
rot = player.Position.R;
lot = player.Position.L;

if (cmd.NextCoord(player.Position.ToBlockCoords().X, out x)
&& cmd.NextCoord(player.Position.ToBlockCoords().Y, out y)
&& cmd.NextCoord(player.Position.ToBlockCoords().Z, out z)) {
if (cmd.NextCoord(player.Position.BlockX, out x)
&& cmd.NextCoord(player.Position.BlockY, out y)
&& cmd.NextCoord(player.Position.BlockFeetZ, out z)) {

if (cmd.CountRemaining >= 2) {
if (cmd.NextInt(out rot) && cmd.NextInt(out lot)) {
@@ -867,7 +867,7 @@ static void SignRemoveHandler(Player player, CommandReader cmd)
return;
}

if (!SpecialZone.CanManage(oldZone.Name.ToLower(), player, "rename a")) return;
if (!SpecialZone.CanManage(oldZone.Name, player, "rename a")) return;
if (!SpecialZone.CanManage(newName, player, "rename to a")) return;

// Check if a zone with "newName" name already exists
@@ -137,6 +137,7 @@ public override string ToString()
public int BlockX { get { return X >> 5; } }
public int BlockY { get { return Y >> 5; } }
public int BlockZ { get { return Z >> 5; } }
public int BlockFeetZ { get { return (Z - Player.CharacterHeight) >> 5; } }


public Vector3I ToBlockCoords() {

0 comments on commit 0282666

Please sign in to comment.
You can’t perform that action at this time.