diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/navigation_polygon.cpp | 7 | ||||
-rw-r--r-- | scene/2d/navigation_polygon.h | 1 | ||||
-rw-r--r-- | scene/3d/voxelizer.cpp | 2 | ||||
-rw-r--r-- | scene/resources/material.cpp | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index c40cdb4720..21b2bede05 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -363,8 +363,11 @@ void NavigationPolygon::_bind_methods() { NavigationPolygon::NavigationPolygon() : rect_cache_dirty(true), - navmesh_generation(NULL) { - navmesh_generation = Mutex::create(); + navmesh_generation(Mutex::create()) { +} + +NavigationPolygon::~NavigationPolygon() { + memdelete(navmesh_generation); } void NavigationPolygonInstance::set_enabled(bool p_enabled) { diff --git a/scene/2d/navigation_polygon.h b/scene/2d/navigation_polygon.h index 92cfc8f5e6..8d3d8543c4 100644 --- a/scene/2d/navigation_polygon.h +++ b/scene/2d/navigation_polygon.h @@ -91,6 +91,7 @@ public: Ref<NavigationMesh> get_mesh(); NavigationPolygon(); + ~NavigationPolygon(); }; class Navigation2D; diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp index 4d7054726d..7cf26ab974 100644 --- a/scene/3d/voxelizer.cpp +++ b/scene/3d/voxelizer.cpp @@ -1087,7 +1087,7 @@ PoolVector<uint8_t> Voxelizer::get_sdf_3d_image() const { if (d == 0) { w[i] = 0; } else { - w[i] = CLAMP(d, 0, 254) + 1; + w[i] = MIN(d, 254) + 1; } } } diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 01e3c4c930..6e2fe01834 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -423,6 +423,7 @@ void BaseMaterial3D::_update_shader() { case TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: texfilter_str = "filter_linear_mipmap"; break; case TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC: texfilter_str = "filter_nearest_mipmap_aniso"; break; case TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: texfilter_str = "filter_linear_mipmap_aniso"; break; + case TEXTURE_FILTER_MAX: break; // Internal value, skip. } if (flags[FLAG_USE_TEXTURE_REPEAT]) { |