diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/canvas_item.cpp | 1 | ||||
-rw-r--r-- | scene/2d/light_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/polygon_2d.cpp | 3 | ||||
-rw-r--r-- | scene/2d/tile_map.cpp | 5 |
4 files changed, 4 insertions, 7 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 3aaed4fb27..6ed008cf9c 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -64,6 +64,7 @@ void CanvasItemMaterial::init_shaders() { void CanvasItemMaterial::finish_shaders() { memdelete(dirty_materials); + memdelete(shader_names); dirty_materials = NULL; #ifndef NO_THREADS diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index 240dbe1a89..d7ed6f8f49 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -450,7 +450,7 @@ void Light2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color"), "set_shadow_color", "get_shadow_color"); ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_buffer_size", PROPERTY_HINT_RANGE, "32,16384,1"), "set_shadow_buffer_size", "get_shadow_buffer_size"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_gradient_length", PROPERTY_HINT_RANGE, "0,4096,0.1"), "set_shadow_gradient_length", "get_shadow_gradient_length"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter", PROPERTY_HINT_ENUM, "None,PCF3,PCF5,PCF7,PCF9,PCF13"), "set_shadow_filter", "get_shadow_filter"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_filter", PROPERTY_HINT_ENUM, "None,PCF3,PCF5,PCF7,PCF9,PCF13"), "set_shadow_filter", "get_shadow_filter"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter_smooth", PROPERTY_HINT_RANGE, "0,64,0.1"), "set_shadow_smooth", "get_shadow_smooth"); ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_item_cull_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_item_shadow_cull_mask", "get_item_shadow_cull_mask"); diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index bfa82fa12e..54b304f851 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -224,15 +224,12 @@ void Polygon2D::_notification(int p_what) { for (int i = 0; i < bone_weights.size(); i++) { if (bone_weights[i].weights.size() != points.size()) { continue; //different number of vertices, sorry not using. - print_line("wrong weight size"); } if (!skeleton_node->has_node(bone_weights[i].path)) { - print_line("no node"); continue; //node does not exist } Bone2D *bone = Object::cast_to<Bone2D>(skeleton_node->get_node(bone_weights[i].path)); if (!bone) { - print_line("no bone"); continue; } diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index cac59bddff..d61296b13f 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -377,13 +377,12 @@ void TileMap::update_dirty_quadrants() { r.size = tile_set->autotile_get_size(c.id); r.position += (r.size + Vector2(spacing, spacing)) * Vector2(c.autotile_coord_x, c.autotile_coord_y); } - Size2 s = tex->get_size(); + Size2 s; if (r == Rect2()) s = tex->get_size(); - else { + else s = r.size; - } Rect2 rect; rect.position = offset.floor(); |