diff options
Diffstat (limited to 'scene/2d/tile_map.cpp')
-rw-r--r-- | scene/2d/tile_map.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index e4494742a1..68b026b1b3 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -1068,20 +1068,20 @@ Transform2D TileMap::get_custom_transform() const { return custom_transform; } -Vector2 TileMap::_map_to_world(int x, int y, bool p_ignore_ofs) const { +Vector2 TileMap::_map_to_world(int p_x, int p_y, bool p_ignore_ofs) const { - Vector2 ret = get_cell_transform().xform(Vector2(x, y)); + Vector2 ret = get_cell_transform().xform(Vector2(p_x, p_y)); if (!p_ignore_ofs) { switch (half_offset) { case HALF_OFFSET_X: { - if (ABS(y) & 1) { + if (ABS(p_y) & 1) { ret += get_cell_transform()[0] * 0.5; } } break; case HALF_OFFSET_Y: { - if (ABS(x) & 1) { + if (ABS(p_x) & 1) { ret += get_cell_transform()[1] * 0.5; } } break; |