fix loop counter for eventstream, closes #4493

This commit is contained in:
Juan Linietsky 2016-06-20 14:43:20 -03:00
parent a1e32a6f7d
commit 8f7a1367fe
1 changed files with 6 additions and 4 deletions

View File

@ -628,10 +628,12 @@ bool EventStreamPlaybackChibi::_update(AudioMixer* p_mixer, uint64_t p_usec){
total_usec+=p_usec;
mixer.process_usecs(p_usec,volume,pitch_scale,tempo_scale);
int order=player->get_current_order();
if (order<last_order && !loop) {
stop();
} else {
loops++;
if (order<last_order) {
if (!loop) {
stop();
} else {
loops++;
}
}
last_order=order;
return false;