diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/camera_2d.h | 2 | ||||
-rw-r--r-- | scene/2d/canvas_item.cpp | 8 | ||||
-rw-r--r-- | scene/2d/collision_object_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/particles_2d.cpp | 4 | ||||
-rw-r--r-- | scene/2d/particles_2d.h | 4 | ||||
-rw-r--r-- | scene/2d/sprite.cpp | 12 | ||||
-rw-r--r-- | scene/2d/tile_map.cpp | 2 |
7 files changed, 18 insertions, 16 deletions
diff --git a/scene/2d/camera_2d.h b/scene/2d/camera_2d.h index 3c51bbf220..22e5bc382a 100644 --- a/scene/2d/camera_2d.h +++ b/scene/2d/camera_2d.h @@ -103,7 +103,7 @@ public: bool is_v_drag_enabled() const; void set_drag_margin(Margin p_margin,float p_drag_margin); - float get_drag_margin(Margin p_margin) const; + float get_drag_margin(Margin p_margin) const; void set_v_offset(float p_offset); float get_v_offset() const; diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 316097fbcf..483feea5c4 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -233,7 +233,7 @@ bool CanvasItem::is_visible() const { const CanvasItem *p=this; - while(p) { + while(p) { if (p->hidden) return false; p=p->get_parent_item(); @@ -310,11 +310,11 @@ void CanvasItem::hide() { } void CanvasItem::set_hidden(bool p_hidden) { - + if (hidden == p_hidden) { return; } - + _set_visible_(!p_hidden); } @@ -1209,7 +1209,7 @@ CanvasItem::CanvasItem() : xform_change(this) { pending_update=false; opacity=1; self_opacity=1; - toplevel=false; + toplevel=false; pending_children_sort=false; first_draw=false; blend_mode=BLEND_MODE_MIX; diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index 3a45b0c84e..b5a6cc435f 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -261,7 +261,7 @@ void CollisionObject2D::add_shape(const Ref<Shape2D>& p_shape, const Matrix32& p else Physics2DServer::get_singleton()->body_add_shape(get_rid(),p_shape->get_rid(),p_transform); - shapes.push_back(sdata); + shapes.push_back(sdata); } int CollisionObject2D::get_shape_count() const { diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp index 5b13c32d93..ffea060e82 100644 --- a/scene/2d/particles_2d.cpp +++ b/scene/2d/particles_2d.cpp @@ -504,7 +504,7 @@ void Particles2D::_notification(int p_what) { invxform=get_global_transform().affine_inverse(); int start_particle = (int)(time * (float)particle_count / lifetime); - + for (int id=0;id<particle_count;++id) { int i = start_particle + id; if (i >= particle_count) { @@ -645,7 +645,7 @@ static const char* _particlesframe_property_rnames[Particles2D::PARAM_MAX]={ "randomness/gravity_strength", "randomness/radial_accel", "randomness/tangential_accel", - "randomness/damping", + "randomness/damping", "randomness/initial_angle", "randomness/initial_size", "randomness/final_size", diff --git a/scene/2d/particles_2d.h b/scene/2d/particles_2d.h index 101395589e..06dcda7165 100644 --- a/scene/2d/particles_2d.h +++ b/scene/2d/particles_2d.h @@ -88,7 +88,7 @@ public: enum Parameter { PARAM_DIRECTION, PARAM_SPREAD, - PARAM_LINEAR_VELOCITY, + PARAM_LINEAR_VELOCITY, PARAM_SPIN_VELOCITY, PARAM_ORBIT_VELOCITY, PARAM_GRAVITY_DIRECTION, @@ -150,7 +150,7 @@ private: Point2 emissor_offset; Vector2 initial_velocity; Vector2 extents; - DVector<Vector2> emission_points; + DVector<Vector2> emission_points; float time; int active_count; diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 001a1366a9..b2902b2867 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -188,13 +188,15 @@ bool Sprite::is_region() const{ void Sprite::set_region_rect(const Rect2& p_region_rect) { - bool changed=region_rect!=p_region_rect; + if (region_rect==p_region_rect) + return; + region_rect=p_region_rect; - if (region && changed) { - update(); + + if (region) item_rect_changed(); - _change_notify("region_rect"); - } + + _change_notify("region_rect"); } Rect2 Sprite::get_region_rect() const { diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 1cd6399962..34a67c088f 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -454,7 +454,7 @@ void TileMap::_update_dirty_quadrants() { shape->draw(debug_canvas_item,debug_collision_color); } - ps->body_add_shape(q.body,shape->get_rid(),xform); + ps->body_add_shape(q.body,shape->get_rid(),xform); ps->body_set_shape_metadata(q.body,shape_idx++,Vector2(E->key().x,E->key().y)); } |