summaryrefslogtreecommitdiff
path: root/modules/gridmap
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gridmap')
-rw-r--r--modules/gridmap/SCsub2
-rw-r--r--modules/gridmap/doc_classes/GridMap.xml2
-rw-r--r--modules/gridmap/editor/grid_map_editor_plugin.h2
-rw-r--r--modules/gridmap/grid_map.cpp10
4 files changed, 8 insertions, 8 deletions
diff --git a/modules/gridmap/SCsub b/modules/gridmap/SCsub
index da3f7d4dd9..282d772592 100644
--- a/modules/gridmap/SCsub
+++ b/modules/gridmap/SCsub
@@ -7,5 +7,5 @@ env_gridmap = env_modules.Clone()
# Godot source files
env_gridmap.add_source_files(env.modules_sources, "*.cpp")
-if env["tools"]:
+if env.editor_build:
env_gridmap.add_source_files(env.modules_sources, "editor/*.cpp")
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
index ed6cb8656a..0f3662c3cf 100644
--- a/modules/gridmap/doc_classes/GridMap.xml
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -57,7 +57,7 @@
<return type="Basis" />
<param index="0" name="position" type="Vector3i" />
<description>
- Returns the basis that gives the specificed cell its orientation.
+ Returns the basis that gives the specified cell its orientation.
</description>
</method>
<method name="get_cell_item_orientation" qualifiers="const">
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.h b/modules/gridmap/editor/grid_map_editor_plugin.h
index a64dc4a80b..6fd38d9445 100644
--- a/modules/gridmap/editor/grid_map_editor_plugin.h
+++ b/modules/gridmap/editor/grid_map_editor_plugin.h
@@ -241,7 +241,7 @@ protected:
void _notification(int p_what);
public:
- virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override { return grid_map_editor->forward_spatial_input_event(p_camera, p_event); }
+ virtual EditorPlugin::AfterGUIInput forward_3d_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override { return grid_map_editor->forward_spatial_input_event(p_camera, p_event); }
virtual String get_name() const override { return "GridMap"; }
bool has_main_screen() const override { return false; }
virtual void edit(Object *p_object) override;
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index 466a2efd21..de50e9ea1e 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -157,13 +157,13 @@ uint32_t GridMap::get_collision_mask() const {
void GridMap::set_collision_layer_value(int p_layer_number, bool p_value) {
ERR_FAIL_COND_MSG(p_layer_number < 1, "Collision layer number must be between 1 and 32 inclusive.");
ERR_FAIL_COND_MSG(p_layer_number > 32, "Collision layer number must be between 1 and 32 inclusive.");
- uint32_t collision_layer = get_collision_layer();
+ uint32_t collision_layer_new = get_collision_layer();
if (p_value) {
- collision_layer |= 1 << (p_layer_number - 1);
+ collision_layer_new |= 1 << (p_layer_number - 1);
} else {
- collision_layer &= ~(1 << (p_layer_number - 1));
+ collision_layer_new &= ~(1 << (p_layer_number - 1));
}
- set_collision_layer(collision_layer);
+ set_collision_layer(collision_layer_new);
}
bool GridMap::get_collision_layer_value(int p_layer_number) const {
@@ -1149,7 +1149,7 @@ TypedArray<Vector3i> GridMap::get_used_cells() const {
TypedArray<Vector3i> GridMap::get_used_cells_by_item(int p_item) const {
TypedArray<Vector3i> a;
for (const KeyValue<IndexKey, Cell> &E : cell_map) {
- if (E.value.item == p_item) {
+ if ((int)E.value.item == p_item) {
Vector3i p(E.key.x, E.key.y, E.key.z);
a.push_back(p);
}