diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/animated_sprite.cpp | 1 | ||||
-rw-r--r-- | scene/2d/cpu_particles_2d.h | 2 | ||||
-rw-r--r-- | scene/2d/line_2d.cpp | 1 | ||||
-rw-r--r-- | scene/2d/tile_map.cpp | 7 | ||||
-rw-r--r-- | scene/3d/arvr_nodes.cpp | 4 | ||||
-rw-r--r-- | scene/gui/line_edit.cpp | 2 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 2 |
7 files changed, 12 insertions, 7 deletions
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index 25ad6bd5c9..075b0e6252 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -646,6 +646,7 @@ void AnimatedSprite::_reset_timeout() { void AnimatedSprite::set_animation(const StringName &p_animation) { ERR_EXPLAIN(vformat("There is no animation with name '%s'.", p_animation)); + ERR_FAIL_COND(frames == NULL) ERR_FAIL_COND(frames->get_animation_names().find(p_animation) == -1); if (animation == p_animation) diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h index 23d2586331..81343a4604 100644 --- a/scene/2d/cpu_particles_2d.h +++ b/scene/2d/cpu_particles_2d.h @@ -116,7 +116,7 @@ private: const Particle *particles; bool operator()(int p_a, int p_b) const { - return particles[p_a].time < particles[p_b].time; + return particles[p_a].time > particles[p_b].time; } }; diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index ba06b3ebff..e116d404d6 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -105,6 +105,7 @@ void Line2D::set_point_position(int i, Vector2 pos) { } Vector2 Line2D::get_point_position(int i) const { + ERR_FAIL_INDEX_V(i, _points.size(), Vector2()) return _points.get(i); } diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 2b43861eea..b3b6f3175d 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -220,8 +220,8 @@ void TileMap::_fix_cell_transform(Transform2D &xform, const Cell &p_cell, const xform.elements[1].y = -xform.elements[1].y; offset.y = s.y - offset.y; } - - offset += cell_size / 2 - s / 2; + /* For a future CheckBox to Center Texture: + offset += cell_size / 2 - s / 2; */ xform.elements[2] += offset; } @@ -372,10 +372,11 @@ void TileMap::update_dirty_quadrants() { if (c.transpose) { SWAP(tile_ofs.x, tile_ofs.y); + /* For a future CheckBox to Center Texture: rect.position.x += cell_size.x / 2 - rect.size.y / 2; rect.position.y += cell_size.y / 2 - rect.size.x / 2; } else { - rect.position += cell_size / 2 - rect.size / 2; + rect.position += cell_size / 2 - rect.size / 2; */ } if (c.flip_h) { diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp index 4e88948ce2..95eec41fb2 100644 --- a/scene/3d/arvr_nodes.cpp +++ b/scene/3d/arvr_nodes.cpp @@ -390,7 +390,7 @@ String ARVRController::get_configuration_warning() const { }; ARVRController::ARVRController() { - controller_id = 0; + controller_id = 1; is_active = true; button_states = 0; }; @@ -530,7 +530,7 @@ Ref<Mesh> ARVRAnchor::get_mesh() const { } ARVRAnchor::ARVRAnchor() { - anchor_id = 0; + anchor_id = 1; is_active = true; }; diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 58bdde1ffd..da6bff8ab8 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -539,7 +539,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { if (handled) { accept_event(); - } else if (!k->get_alt() && !k->get_command()) { + } else if (!k->get_command()) { if (k->get_unicode() >= 32 && k->get_scancode() != KEY_DELETE) { if (editable) { diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 6203b15992..2258141385 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4682,6 +4682,8 @@ bool TextEdit::has_keyword_color(String p_keyword) const { } Color TextEdit::get_keyword_color(String p_keyword) const { + + ERR_FAIL_COND_V(!keywords.has(p_keyword), Color()) return keywords[p_keyword]; } |