function scr_rhythmgame_beatcheck(arg0 = false) { var _update = 0; if (signature_count > 1) { if (signature_index < (signature_count - 1) && trackpos > signature_time[signature_index + 1]) { signature_index++; _update += 1; signature = signature_change[signature_index]; beatstart = signature_time[signature_index]; } else if (arg0 && signature_index > 0 && trackpos < signature_time[signature_index]) { signature_index--; signature = signature_change[signature_index]; beatstart = max(bpm_time[bpm_index], signature_time[signature_index]); } } if (bpm_count > 1) { if (bpm_index < (bpm_count - 1) && trackpos > bpm_time[bpm_index + 1]) { bpm_index++; _update += 2; bpm = bpm_change[bpm_index]; notespacing = 60 / bpm; meter = notespacing * signature; beatstart = bpm_time[bpm_index]; } else if (arg0 && bpm_index > 0 && trackpos < bpm_time[bpm_index]) { bpm_index--; bpm = bpm_change[bpm_index]; notespacing = 60 / bpm; meter = notespacing * signature; beatstart = max(bpm_time[bpm_index], signature_time[signature_index]); } } if (_update > 0) { with (obj_rhythmgame_chart) { if (_update != 2) { signature = other.signature; signature_index = other.signature_index; if (confidence < 1) conf_decay = 10; } if (_update >= 2) { bpm_index = other.bpm_index; bpm = other.bpm; notespacing = other.notespacing; } } with (obj_music_event_manager) { time_offset = max(other.bpm_time[other.bpm_index], other.signature_time[other.signature_index]); bpm = other.bpm; signature = other.signature; } } }