diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-22 00:58:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 00:58:12 +0200 |
commit | df590fc2d33c1ba715a4ce58f71d83e0ed9f5693 (patch) | |
tree | 8bfdc3e033aaf4dc9a5de5e8040e4f99afa0c540 /scene/resources | |
parent | 13f879587dd9bce59528e44b0faaf6e062f6d918 (diff) | |
parent | 738d2ab96997faa1e13b91e38cf8a0000d829f70 (diff) |
Merge pull request #10340 from Rubonnek/remove-unnecessary-assignments
Removed unnecessary assignments
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/primitive_meshes.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
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++) { |