diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/animated_sprite.cpp | 4 | ||||
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 4 | ||||
-rw-r--r-- | scene/2d/parallax_background.cpp | 4 | ||||
-rw-r--r-- | scene/2d/physics_body_2d.cpp | 4 | ||||
-rw-r--r-- | scene/2d/polygon_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/visibility_notifier_2d.cpp | 2 |
6 files changed, 13 insertions, 7 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index b31bb39c0d..b11c2c2886 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -398,11 +398,11 @@ void AnimatedSprite::_notification(int p_what) { emit_signal(SceneStringNames::get_singleton()->animation_finished); frame = 0; } else { + frame = fc - 1; if (!is_over) { - emit_signal(SceneStringNames::get_singleton()->animation_finished); is_over = true; + emit_signal(SceneStringNames::get_singleton()->animation_finished); } - frame = fc - 1; } } else { frame++; diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index a1b624a246..613387bf07 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -1310,10 +1310,10 @@ void CPUParticles2D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE); ADD_GROUP("Color", ""); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color"); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "GradientTexture"), "set_color_ramp", "get_color_ramp"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_color_ramp", "get_color_ramp"); ADD_GROUP("Hue Variation", "hue_"); - ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.1"), "set_param", "get_param", PARAM_HUE_VARIATION); + ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation", PROPERTY_HINT_RANGE, "-1,1,0.01"), "set_param", "get_param", PARAM_HUE_VARIATION); ADD_PROPERTYI(PropertyInfo(Variant::REAL, "hue_variation_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_HUE_VARIATION); ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "hue_variation_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_HUE_VARIATION); ADD_GROUP("Animation", "anim_"); diff --git a/scene/2d/parallax_background.cpp b/scene/2d/parallax_background.cpp index 027d64b813..59cb16fe91 100644 --- a/scene/2d/parallax_background.cpp +++ b/scene/2d/parallax_background.cpp @@ -206,7 +206,9 @@ void ParallaxBackground::_bind_methods() { ParallaxBackground::ParallaxBackground() { - base_scale = Vector2(1, 1); scale = 1.0; set_layer(-1); //behind all by default + + base_scale = Vector2(1, 1); + ignore_camera_zoom = false; } diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 929b4624ee..3dde228bfa 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -1425,6 +1425,10 @@ void KinematicBody2D::set_sync_to_physics(bool p_enable) { return; } sync_to_physics = p_enable; + + if (Engine::get_singleton()->is_editor_hint()) + return; + if (p_enable) { Physics2DServer::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed"); set_only_update_transform_changes(true); diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index fc0741cc5c..aa6d57a67d 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -194,7 +194,7 @@ void Polygon2D::_notification(int p_what) { } } - if (!invert && bone_weights.size()) { + if (skeleton_node && !invert && bone_weights.size()) { //a skeleton is set! fill indices and weights int vc = points.size(); bones.resize(vc * 4); diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp index 7d7c47619a..d656ba0f64 100644 --- a/scene/2d/visibility_notifier_2d.cpp +++ b/scene/2d/visibility_notifier_2d.cpp @@ -190,7 +190,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) { if (enabler[ENABLER_FREEZE_BODIES]) { RigidBody2D *rb2d = Object::cast_to<RigidBody2D>(p_node); - if (rb2d && ((rb2d->get_mode() == RigidBody2D::MODE_CHARACTER || (rb2d->get_mode() == RigidBody2D::MODE_RIGID && !rb2d->is_able_to_sleep())))) { + if (rb2d && ((rb2d->get_mode() == RigidBody2D::MODE_CHARACTER || rb2d->get_mode() == RigidBody2D::MODE_RIGID))) { add = true; meta = rb2d->get_mode(); |