diff --git a/src/engine/devcmd/cmds/GetHeightCmd.java b/src/engine/devcmd/cmds/GetHeightCmd.java index 5438960a..83c0fb99 100644 --- a/src/engine/devcmd/cmds/GetHeightCmd.java +++ b/src/engine/devcmd/cmds/GetHeightCmd.java @@ -50,11 +50,11 @@ public class GetHeightCmd extends AbstractDevCmd { float blendedHeight = Terrain.getWorldHeight(currentZone, playerCharacter.getLoc()); Vector2f terrainCell = heightmapZone.terrain.getTerrainCell(childZoneLoc); + Vector2f cell_offset = new Vector2f(terrainCell.x % 1, terrainCell.y % 1); terrainCell.x = (float) Math.floor(terrainCell.x); terrainCell.y = (float) Math.floor(terrainCell.y); - Vector2f cell_offset = new Vector2f(terrainCell.x % 1, terrainCell.y % 1); short top_left_pixel = heightmapZone.terrain.terrain_pixel_data[(int) terrainCell.x][(int) terrainCell.y]; short top_right_pixel = heightmapZone.terrain.terrain_pixel_data[(int) terrainCell.x + 1][(int) terrainCell.y];