Fix duplication thingy

This commit is contained in:
MeowcaTheoRange 2024-12-06 22:13:11 -06:00
parent e551af28cd
commit a4fbfeaddb

View file

@ -321,14 +321,14 @@ func fuck_with_frames_tree() -> void:
var placeholder var placeholder
if next_frame != null and not duplicate: if next_frame != null and not duplicate:
placeholder = next_frame.duplicate(false) placeholder = next_frame.duplicate(false)
cur_anim.frames[item_index + 1] = frame cur_anim.frames[item_index + 1] = frame.duplicate(false)
if next_frame != null and not duplicate: if next_frame != null and not duplicate:
cur_anim.frames[item_index] = placeholder cur_anim.frames[item_index] = placeholder
if id == 1: if id == 1:
if item_index - 1 < 0: return if item_index - 1 < 0: return
var prev_frame = cur_anim.frames[item_index - 1] var prev_frame = cur_anim.frames[item_index - 1]
var placeholder = prev_frame.duplicate(false) var placeholder = prev_frame.duplicate(false)
cur_anim.frames[item_index - 1] = frame cur_anim.frames[item_index - 1] = frame.duplicate(false)
cur_anim.frames[item_index] = placeholder cur_anim.frames[item_index] = placeholder
set_frames_tree() set_frames_tree()
) )