Skip to content

Commit bde640c

Browse files
committed
Fix tempo changer and sound stopper affected by layer
1 parent 353360b commit bde640c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/control_step/control_step.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ function control_step() {
248248
if (current_time - current_song.song_added[xx, b] < 1000) a = 0
249249
}
250250
var insname = current_song.instrument_list[| ds_list_find_index(current_song.instrument_list, current_song.song_ins[xx, b])].name
251-
if (insname = "Tempo Changer") current_song.tempo = floor(abs(e)) / 15
251+
if (insname = "Tempo Changer") current_song.tempo = floor(abs(current_song.song_pit[xx, b])) / 15
252252
else if (insname = "Toggle Rainbow") {rainbowtoggle = !rainbowtoggle draw_accent_init()}
253-
else if (insname = "Sound Stopper") {remove_emitters_all(floor(e), panning_velocity_to_short(d, c))}
253+
else if (insname = "Sound Stopper") {remove_emitters_all(floor(current_song.song_pit[xx, b]), panning_velocity_to_short(current_song.song_pan[xx, b], current_song.song_vel[xx, b]))}
254254
else if (insname = "Show Save Popup") set_msg("Song saved")
255255
else if (string_count(string_lower("Change Color to #"), string_lower(insname)) = 1) {
256256
draw_set_accent(real("0x" + string_copy(insname, 18, 2)), real("0x" + string_copy(insname, 20, 2)), real("0x" + string_copy(insname, 22, 2)))

scripts/toggle_playing/toggle_playing.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ function toggle_playing(argument0) {
4747
}
4848
}
4949
var insname = songs[song].instrument_list[| ds_list_find_index(songs[song].instrument_list, songs[song].song_ins[xx, b])].name
50-
if (insname = "Tempo Changer") songs[song].tempo = floor(abs(e)) / 15
50+
if (insname = "Tempo Changer") songs[song].tempo = floor(abs(songs[song].song_pit[xx, b])) / 15
5151
else if (insname = "Toggle Rainbow") {rainbowtoggle = !rainbowtoggle draw_accent_init()}
52-
else if (insname = "Sound Stopper") {remove_emitters_all(floor(e), panning_velocity_to_short(d, c))}
52+
else if (insname = "Sound Stopper") {remove_emitters_all(floor(songs[song].song_pit[xx, b]), panning_velocity_to_short(songs[song].song_pan[xx, b], songs[song].song_vel[xx, b]))}
5353
else if (insname = "Show Save Popup") set_msg("Song saved")
5454
else if (string_count(string_lower("Change Color to #"), string_lower(insname)) = 1) {
5555
draw_set_accent(real("0x" + string_copy(insname, 18, 2)), real("0x" + string_copy(insname, 20, 2)), real("0x" + string_copy(insname, 22, 2)))

0 commit comments

Comments
 (0)