mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Copy the required data in recalculate_handle_points, so the original mesh doesn't get modified as a side effect.
This commit is contained in:
parent
cf6da736c2
commit
7565993faa
@ -281,7 +281,17 @@ func recalculate_handle_points() -> void:
|
||||
_handle_points.resize(0)
|
||||
_handle_to_vertex_map.resize(0)
|
||||
|
||||
var merged_arrays : Array = MeshUtils.merge_mesh_array(_mdr.array)
|
||||
var mdr_arr : Array = _mdr.array
|
||||
|
||||
if mdr_arr.size() != ArrayMesh.ARRAY_MAX:
|
||||
return
|
||||
|
||||
var arr : Array = Array()
|
||||
arr.resize(ArrayMesh.ARRAY_MAX)
|
||||
arr[ArrayMesh.ARRAY_VERTEX] = mdr_arr[ArrayMesh.ARRAY_VERTEX]
|
||||
arr[ArrayMesh.ARRAY_INDEX] = mdr_arr[ArrayMesh.ARRAY_INDEX]
|
||||
|
||||
var merged_arrays : Array = MeshUtils.merge_mesh_array(arr)
|
||||
_handle_points = merged_arrays[ArrayMesh.ARRAY_VERTEX]
|
||||
|
||||
if selection_mode == SelectionMode.SELECTION_MODE_VERTEX:
|
||||
|
Loading…
Reference in New Issue
Block a user