Skip to content

Commit

Permalink
Fix empty-choice-indent bug (dialogic-godot#1991)
Browse files Browse the repository at this point in the history
Reported by a user on discord, having an empty choice before an indentation change would incorreclty calculate the amount of end branches needed.
  • Loading branch information
Jowan-Spooner authored and Invertex committed Jan 26, 2024
1 parent 6da58b2 commit 9f6755b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/dialogic/Resources/timeline.gd
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func process() -> void:
_events.append(end_event.duplicate())
# Add an end event if the indent is the same but the previous was an opener
# (so for example choice that is empty)
elif prev_was_opener and len(indent) == len(prev_indent):
if prev_was_opener and len(indent) <= len(prev_indent):
_events.append(end_event.duplicate())
prev_indent = indent

Expand Down

0 comments on commit 9f6755b

Please sign in to comment.