summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/polygon_2d.cpp4
-rw-r--r--scene/3d/vehicle_body.cpp3
-rw-r--r--scene/gui/text_edit.cpp4
-rw-r--r--scene/gui/tree.cpp1
-rw-r--r--scene/gui/video_player.cpp1
-rw-r--r--scene/resources/primitive_meshes.cpp10
6 files changed, 8 insertions, 15 deletions
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index 7e2d6d1b5a..cde5724069 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -143,9 +143,7 @@ void Polygon2D::_notification(int p_what) {
Transform2D texmat(tex_rot, tex_ofs);
texmat.scale(tex_scale);
- Size2 tex_size = Vector2(1, 1);
-
- tex_size = texture->get_size();
+ Size2 tex_size = texture->get_size();
uvs.resize(points.size());
if (points.size() == uv.size()) {
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp
index adf235c525..2a41c8f30e 100644
--- a/scene/3d/vehicle_body.cpp
+++ b/scene/3d/vehicle_body.cpp
@@ -559,6 +559,9 @@ void VehicleBody::_resolve_single_bilateral(PhysicsDirectBodyState *s, const Vec
b2invinertia,
b2invmass);
+ // FIXME: rel_vel assignment here is overwritten by the following assignment.
+ // What seemes to be intented in the next next assignment is: rel_vel = normal.dot(rel_vel);
+ // Investigate why.
real_t rel_vel = jac.getRelativeVelocity(
s->get_linear_velocity(),
s->get_transform().basis.transposed().xform(s->get_angular_velocity()),
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 0ed2487e5e..f15fb71f87 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -3898,11 +3898,9 @@ bool TextEdit::search(const String &p_key, uint32_t p_search_flags, int p_from_l
//search through the whole documment, but start by current line
- int line = -1;
+ int line = p_from_line;
int pos = -1;
- line = p_from_line;
-
for (int i = 0; i < text.size() + 1; i++) {
//backwards is broken...
//int idx=(p_search_flags&SEARCH_BACKWARDS)?(text.size()-i):i; //do backwards seearch
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index f819574e93..20bf818d44 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1459,7 +1459,6 @@ void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_c
c.selected = true;
selected_item = p_selected;
selected_col = 0;
- selected_item = p_selected;
if (!emitted_row) {
emit_signal("item_selected");
emitted_row = true;
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 4886b1cc26..37d10fb63e 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -399,7 +399,6 @@ VideoPlayer::VideoPlayer() {
paused = false;
autoplay = false;
expand = true;
- loops = false;
audio_track = 0;
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index 6a3ddde02a..2b8c0ddedd 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -1016,13 +1016,9 @@ void PrismMesh::_create_mesh_array(Array &p_arr) const {
for (j = 0; j <= (subdivide_h + 1); j++) {
float scale = (y - start_pos.y) / size.y;
float scaled_size_x = size.x * scale;
- float start_x = start_pos.x;
- float offset_front = 0.0;
- float offset_back = 0.0;
-
- start_x += (1.0 - scale) * size.x * left_to_right;
- offset_front += (1.0 - scale) * onethird * left_to_right;
- offset_back = (1.0 - scale) * onethird * (1.0 - left_to_right);
+ float start_x = start_pos.x + (1.0 - scale) * size.x * left_to_right;
+ float offset_front = (1.0 - scale) * onethird * left_to_right;
+ float offset_back = (1.0 - scale) * onethird * (1.0 - left_to_right);
x = 0.0;
for (i = 0; i <= (subdivide_w + 1); i++) {