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
Music Widget only plays one song
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
- KingRaptor
- Zero-K Developer
- Posts: 838
- Joined: 14 Mar 2007, 03:44
Re: Music Widget only plays one song
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
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 >=
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Music Widget only plays one song
Thanks KR. The transitions are actually a little nicer now from song to song it seems, so that's a win.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Music Widget only plays one song
Arugh, when it switches to war tracks it starts playing two at once 
pastebin of current widget:
http://pastebin.com/rVAEvPkJ

pastebin of current widget:
http://pastebin.com/rVAEvPkJ
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Music Widget only plays one song
KR helped me fix it.
Needed moar stopsoundstream.
Needed moar stopsoundstream.