From 20d8cf876b4377a0224f4fd71432575015c22fbb Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Thu, 4 Oct 2018 23:12:20 +0100 Subject: [PATCH] Fix voxel tiles not editable in editor --- voxel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voxel.cpp b/voxel.cpp index bbb8514..ad40022 100644 --- a/voxel.cpp +++ b/voxel.cpp @@ -37,7 +37,7 @@ bool Voxel::_set(const StringName &p_name, const Variant &p_value) { // TODO Eventualy these could be Rect2 for maximum flexibility? if (name.begins_with("cube_tiles/")) { - String s = name.substr(STRLEN("cube_tiles/"), name.length()); + String s = name.substr(STRLEN("cube_tiles/") - 1, name.length()); Cube::Side side = name_to_side(s); if (side != Cube::SIDE_COUNT) { Vector2 v = p_value; @@ -61,7 +61,7 @@ bool Voxel::_get(const StringName &p_name, Variant &r_ret) const { if (name.begins_with("cube_tiles/")) { - String s = name.substr(STRLEN("cube_tiles/"), name.length()); + String s = name.substr(STRLEN("cube_tiles/") - 1, name.length()); Cube::Side side = name_to_side(s); if (side != Cube::SIDE_COUNT) { r_ret = _cube_tiles[side];