diff options
author | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2017-08-21 15:15:36 -0400 |
---|---|---|
committer | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2017-08-21 15:15:55 -0400 |
commit | 738d2ab96997faa1e13b91e38cf8a0000d829f70 (patch) | |
tree | e33258663017edb924695e68224ba836e5fc9f08 /scene/resources | |
parent | 4717d37bfa867d8cdcd4805967324978da6701b7 (diff) |
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++) { |