diff options
author | Mariano Javier Suligoy <marianognu.easyrpg@gmail.com> | 2019-04-04 23:17:29 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-04 23:17:29 -0300 |
commit | 1ab9b86a2156998bc74452b081978ffedfc8bc7a (patch) | |
tree | 821ca66817631667d19e4fa2452059d354f2ce05 /editor/plugins | |
parent | 60fbbba39892704e89ff70ea3e4254761feaeb7b (diff) | |
parent | a6f5cf7de7ecbd0425c14baa1281e742ebad3e4f (diff) |
Merge pull request #27500 from samdze/master
Allow TileMap to override set_cell behaviour while using TileMap editor
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index b1fc14e88a..5b999247be 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -299,7 +299,11 @@ void TileMapEditor::_set_cell(const Point2i &p_pos, Vector<int> p_values, bool p } } - node->set_cell(p_pos.x, p_pos.y, p_value, p_flip_h, p_flip_v, p_transpose, p_autotile_coord); + Variant v_pos_x = p_pos.x, v_pos_y = p_pos.y, v_tile = p_value, v_flip_h = p_flip_h, v_flip_v = p_flip_v, v_transpose = p_transpose, v_autotile_coord = Vector2(p_autotile_coord.x, p_autotile_coord.y); + 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; + node->call("set_cell", args, 7, ce); + if (manual_autotile || (p_value != -1 && node->get_tileset()->tile_get_tile_mode(p_value) == TileSet::ATLAS_TILE)) { if (current != -1) { node->set_cell_autotile_coord(p_pos.x, p_pos.y, position); |