diff options
Diffstat (limited to 'modules/gridmap')
-rw-r--r-- | modules/gridmap/grid_map.cpp | 16 | ||||
-rw-r--r-- | modules/gridmap/grid_map.h | 2 | ||||
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.h | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index f241a96e58..1205776882 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -1049,21 +1049,21 @@ void GridMap::_update_area_instances() { } } -Error GridMap::create_area(int p_id, const Rect3 &p_bounds) { +Error GridMap::create_area(int p_id, const Rect3 &p_area) { ERR_FAIL_COND_V(area_map.has(p_id), ERR_ALREADY_EXISTS); ERR_EXPLAIN("ID 0 is taken as global area, start from 1"); ERR_FAIL_COND_V(p_id == 0, ERR_INVALID_PARAMETER); - ERR_FAIL_COND_V(p_bounds.has_no_area(), ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V(p_area.has_no_area(), ERR_INVALID_PARAMETER); // FIRST VALIDATE AREA IndexKey from, to; - from.x = p_bounds.position.x; - from.y = p_bounds.position.y; - from.z = p_bounds.position.z; - to.x = p_bounds.position.x + p_bounds.size.x; - to.y = p_bounds.position.y + p_bounds.size.y; - to.z = p_bounds.position.z + p_bounds.size.z; + from.x = p_area.position.x; + from.y = p_area.position.y; + from.z = p_area.position.z; + to.x = p_area.position.x + p_area.size.x; + to.y = p_area.position.y + p_area.size.y; + to.z = p_area.position.z + p_area.size.z; for (Map<int, Area *>::Element *E = area_map.front(); E; E = E->next()) { //this should somehow be faster... diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h index c386e4f66b..106bf82dc2 100644 --- a/modules/gridmap/grid_map.h +++ b/modules/gridmap/grid_map.h @@ -242,7 +242,7 @@ public: void set_center_z(bool p_enable); bool get_center_z() const; - void set_cell_item(int p_x, int p_y, int p_z, int p_item, int p_orientation = 0); + void set_cell_item(int p_x, int p_y, int p_z, int p_item, int p_rot = 0); int get_cell_item(int p_x, int p_y, int p_z) const; int get_cell_item_orientation(int p_x, int p_y, int p_z) const; diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index 954e865bcd..38f58799df 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -1203,7 +1203,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { edit_mode = memnew(OptionButton); edit_mode->set_area_as_parent_rect(); edit_mode->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_BEGIN, 24); - edit_mode->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 14); + edit_mode->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -14); edit_mode->add_item("Tiles"); edit_mode->add_item("Areas"); hb->add_child(edit_mode); diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h index 1572f4fbe5..a1b2c96ccd 100644 --- a/modules/gridmap/grid_map_editor_plugin.h +++ b/modules/gridmap/grid_map_editor_plugin.h @@ -239,8 +239,8 @@ public: virtual bool forward_spatial_input_event(Camera *p_camera, const Ref<InputEvent> &p_event) { return gridmap_editor->forward_spatial_input_event(p_camera, p_event); } virtual String get_name() const { return "GridMap"; } bool has_main_screen() const { return false; } - virtual void edit(Object *p_node); - virtual bool handles(Object *p_node) const; + virtual void edit(Object *p_object); + virtual bool handles(Object *p_object) const; virtual void make_visible(bool p_visible); GridMapEditorPlugin(EditorNode *p_node); |