summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-12-31 15:18:03 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-12-31 15:18:03 -0300
commitd1a799f74412a0ae16b6023a927c1b7b3c052f96 (patch)
treeefa75da9a1bf6ab0745a2733d78be52aac9daa79
parentbc2b1696e6bbe2cd50c65be81ee2bed71ea7cf9e (diff)
-fix range limit issue in Particles2D, closes #2411
-rw-r--r--scene/2d/particles_2d.cpp4
-rw-r--r--scene/gui/tree.cpp3
2 files changed, 3 insertions, 4 deletions
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index 2373af9d0c..3527175a00 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -697,7 +697,7 @@ bool Particles2D::is_emitting() const {
void Particles2D::set_amount(int p_amount) {
- ERR_FAIL_INDEX(p_amount,1024);
+ ERR_FAIL_INDEX(p_amount,1024+1);
particles.resize(p_amount);
}
@@ -719,7 +719,7 @@ float Particles2D::get_emit_timeout() const {
void Particles2D::set_lifetime(float p_lifetime) {
- ERR_FAIL_INDEX(p_lifetime,3600);
+ ERR_FAIL_INDEX(p_lifetime,3600+1);
lifetime=p_lifetime;
}
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 585f3a8936..ca473565ca 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2128,8 +2128,7 @@ void Tree::_input_event(InputEvent p_event) {
float diff_y = -b.relative_y;
diff_y=Math::pow(ABS(diff_y),1.8)*SGN(diff_y);
diff_y*=0.1;
- range_drag_base=CLAMP(range_drag_base + c.step * diff_y, c.min, c.max);
-
+ range_drag_base=CLAMP(range_drag_base + c.step * diff_y, c.min, c.max);
popup_edited_item->set_range(popup_edited_item_col,range_drag_base);
item_edited(popup_edited_item_col,popup_edited_item);