diff options
Diffstat (limited to 'scene/2d')
| -rw-r--r-- | scene/2d/collision_polygon_2d.cpp | 1 | ||||
| -rw-r--r-- | scene/2d/collision_shape_2d.cpp | 1 | ||||
| -rw-r--r-- | scene/2d/particles_2d.cpp | 6 | ||||
| -rw-r--r-- | scene/2d/physics_body_2d.cpp | 4 |
4 files changed, 7 insertions, 5 deletions
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp index 04f096f229..4364e5f1fc 100644 --- a/scene/2d/collision_polygon_2d.cpp +++ b/scene/2d/collision_polygon_2d.cpp @@ -243,6 +243,7 @@ void CollisionPolygon2D::set_polygon(const Vector<Point2>& p_polygon) { _update_parent(); } update(); + update_configuration_warning(); } Vector<Point2> CollisionPolygon2D::get_polygon() const { diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp index a92065d6fb..45fc734aef 100644 --- a/scene/2d/collision_shape_2d.cpp +++ b/scene/2d/collision_shape_2d.cpp @@ -159,6 +159,7 @@ void CollisionShape2D::set_shape(const Ref<Shape2D>& p_shape) { if (shape.is_valid()) shape->connect("changed",this,"_shape_changed"); + update_configuration_warning(); } Ref<Shape2D> CollisionShape2D::get_shape() const { diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp index cd99f30f6d..1051d3f5ff 100644 --- a/scene/2d/particles_2d.cpp +++ b/scene/2d/particles_2d.cpp @@ -364,7 +364,7 @@ void Particles2D::_process_particles(float p_delta) { p.rot=Math::deg2rad(param[PARAM_INITIAL_ANGLE]+param[PARAM_INITIAL_ANGLE]*randomness[PARAM_INITIAL_ANGLE]*_rand_from_seed(&rand_seed)); active_count++; - p.frame=Math::fmod(param[PARAM_ANIM_INITIAL_POS]+randomness[PARAM_ANIM_INITIAL_POS]*_rand_from_seed(&rand_seed),1.0); + p.frame=Math::fmod(param[PARAM_ANIM_INITIAL_POS]+randomness[PARAM_ANIM_INITIAL_POS]*_rand_from_seed(&rand_seed),1.0f); } else { @@ -438,7 +438,7 @@ void Particles2D::_process_particles(float p_delta) { p.pos+=p.velocity*frame_time; p.rot+=Math::lerp(param[PARAM_SPIN_VELOCITY],param[PARAM_SPIN_VELOCITY]*randomness[PARAM_SPIN_VELOCITY]*_rand_from_seed(&rand_seed),randomness[PARAM_SPIN_VELOCITY])*frame_time; float anim_spd=param[PARAM_ANIM_SPEED_SCALE]+param[PARAM_ANIM_SPEED_SCALE]*randomness[PARAM_ANIM_SPEED_SCALE]*_rand_from_seed(&rand_seed); - p.frame=Math::fposmod(p.frame+(frame_time/lifetime)*anim_spd,1.0); + p.frame=Math::fposmod(p.frame+(frame_time/lifetime)*anim_spd,1.0f); active_count++; @@ -555,7 +555,7 @@ void Particles2D::_notification(int p_what) { float a=color.a; //float preh=h; h+=huerot; - h=Math::abs(Math::fposmod(h,1.0)); + h=Math::abs(Math::fposmod(h,1.0f)); //print_line("rand: "+rtos(randomness[PARAM_HUE_VARIATION])+" rand: "+rtos(huerand)); //print_line(itos(i)+":hue: "+rtos(preh)+" + "+rtos(huerot)+" = "+rtos(h)); color.set_hsv(h,s,v); diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index feecbd9e20..96d90a1de6 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -1262,7 +1262,7 @@ Vector2 KinematicBody2D::move_and_slide(const Vector2& p_linear_velocity,const V //all is a wall move_and_slide_on_wall=true; } else { - if ( get_collision_normal().dot(p_floor_direction) > Math::cos(Math::deg2rad(45))) { //floor + if ( get_collision_normal().dot(p_floor_direction) > Math::cos(Math::deg2rad((float)45))) { //floor move_and_slide_on_floor=true; @@ -1272,7 +1272,7 @@ Vector2 KinematicBody2D::move_and_slide(const Vector2& p_linear_velocity,const V revert_motion(); return Vector2(); } - } else if ( get_collision_normal().dot(p_floor_direction) < Math::cos(Math::deg2rad(45))) { //ceiling + } else if ( get_collision_normal().dot(p_floor_direction) < Math::cos(Math::deg2rad((float)45))) { //ceiling move_and_slide_on_ceiling=true; } else { move_and_slide_on_wall=true; |