diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-30 10:55:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 10:55:53 +0200 |
commit | ac0369e9ff15c575a5ba242203e51b5ee4e7254f (patch) | |
tree | cc1f210a083e795ecb0ef405270ea62a934f9544 /scene | |
parent | 79040656e1c1d1f852c0ab2b874e837524237ff6 (diff) | |
parent | e2dd0c101ef93cb2f0d5dac4082a4ac25c83a0bd (diff) |
Merge pull request #27845 from samdze/master
Make TileMap overridable "set_cell" function called on undo/redo
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/tile_map.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 885c9ea8bc..b321bcf3ce 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -749,7 +749,10 @@ void TileMap::set_cellv(const Vector2 &p_pos, int p_tile, bool p_flip_x, bool p_ void TileMap::_set_celld(const Vector2 &p_pos, const Dictionary &p_data) { - set_cell(p_pos.x, p_pos.y, p_data["id"], p_data["flip_h"], p_data["flip_y"], p_data["transpose"], p_data["auto_coord"]); + Variant v_pos_x = p_pos.x, v_pos_y = p_pos.y, v_tile = p_data["id"], v_flip_h = p_data["flip_h"], v_flip_v = p_data["flip_y"], v_transpose = p_data["transpose"], v_autotile_coord = p_data["auto_coord"]; + const Variant *args[7] = { &v_pos_x, &v_pos_y, &v_tile, &v_flip_h, &v_flip_v, &v_transpose, &v_autotile_coord }; + Variant::CallError ce; + call("set_cell", args, 7, ce); } void TileMap::set_cell(int p_x, int p_y, int p_tile, bool p_flip_x, bool p_flip_y, bool p_transpose, Vector2 p_autotile_coord) { |