Page 1 of 1
Music Widget only plays one song
Posted: 24 Nov 2011, 04:13
by Forboding Angel
then stops. If shit gets destroyed, then it will play one war track and then stop.
Can someone please help maek fixie?
http://code.google.com/p/evolutionrts/s ... /music.lua
Re: Music Widget only plays one song
Posted: 24 Nov 2011, 16:38
by KingRaptor
The way Spring.GetSoundStreamTime() works was apparently changed in 84.0. It now returns (0, 0) if there is no running track (e.g. if the last one already ended).
See line 181
Code: Select all
-if ( (musicType ~= lastTrackType and musicType == 'war') or (playedTime > totalTime)) then
+if ( (musicType ~= lastTrackType and musicType == 'war') or (playedTime == 0 and totalTime == 0)) then
or you could just change the > to a >=
Re: Music Widget only plays one song
Posted: 25 Nov 2011, 21:48
by Forboding Angel
Thanks KR. The transitions are actually a little nicer now from song to song it seems, so that's a win.
Re: Music Widget only plays one song
Posted: 26 Nov 2011, 09:50
by Forboding Angel
Arugh, when it switches to war tracks it starts playing two at once
pastebin of current widget:
http://pastebin.com/rVAEvPkJ
Re: Music Widget only plays one song
Posted: 26 Nov 2011, 21:02
by Forboding Angel
KR helped me fix it.
Needed moar stopsoundstream.