Skip to content

Commit b0d3c41

Browse files
author
ShinkoNet
committed
Fix note velocity if a note block occupies same space
1 parent fc7295d commit b0d3c41

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

scripts/branch_export/branch_export.gml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,19 @@ sellayer = real(sch_br_layer1) - 1
413413
schematic_cell_set(mySchematic, zvel, a + 3, 2, 0, 0)
414414
schematic_cell_set(mySchematic, zvel, a + 3, 0, sch_exp_ins_block[nblockins[z, nblocks]], 0)
415415
noteblockx[z, nblocks] = a + 3
416-
} else {
416+
} else if (schematic_block_get(mySchematic, zvel, a + 3, 1) = 25) && (schematic_block_get(mySchematic, zvel, a + 1, 1) = 0) {
417+
schematic_cell_set(mySchematic, zvel, a + 1, 1, 25, 0)
418+
schematic_cell_set(mySchematic, zvel, a + 1, 2, 0, 0)
419+
schematic_cell_set(mySchematic, zvel, a + 1, 0, sch_exp_ins_block[nblockins[z, nblocks]], 0)
420+
noteblockx[z, nblocks] = a + 1
421+
show_debug_message("note block in way")
422+
} else if (schematic_block_get(mySchematic, zvel, a + 1, 1) = 25) && (schematic_block_get(mySchematic, zvel, a + 3, 1) = 0) {
423+
schematic_cell_set(mySchematic, zvel, a + 3, 1, 25, 0)
424+
schematic_cell_set(mySchematic, zvel, a + 3, 2, 0, 0)
425+
schematic_cell_set(mySchematic, zvel, a + 3, 0, sch_exp_ins_block[nblockins[z, nblocks]], 0)
426+
noteblockx[z, nblocks] = a + 3
427+
show_debug_message("note block in way")
428+
} else {
417429
schematic_cell_set(mySchematic, zvel, a + 2, 1, 25, 0)
418430
schematic_cell_set(mySchematic, zvel, a + 2, 2, 0, 0)
419431
schematic_cell_set(mySchematic, zvel, a + 2, 0, sch_exp_ins_block[nblockins[z, nblocks]], 0)

scripts/draw_window_branch_export/draw_window_branch_export.gml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ if (draw_button2(x1 + 470, y1 + 368, 72, "Export") && wmenu = 0) {
172172
message("There are no blocks to export!", "Branch export")
173173
} else if sch_exp_range_start > sch_exp_range_end {
174174
message("Starting range must be lower than ending range!", "Branch export")
175+
} else if sch_exp_range_end = 0 {
176+
message("Please enter a range!", "Branch export")
175177
}
176178
else {
177179
branch_export()

0 commit comments

Comments
 (0)