Ignore:
Timestamp:
06/15/09 09:16:27 (11 years ago)
Author:
maximinus_parpg
Message:

Fixed bug where music was unpaused between maps.
Added all internal walls to shanty building internals.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PARPG/scripts/sounds.py

    r135 r140  
    2626        self.music = self.sound_engine.createEmitter() 
    2727        self.music_on = False 
     28        self.music_init = False 
    2829     
    2930    def playMusic(self, sfile = None): 
     
    3334            self.music.setSoundClip(sound) 
    3435            self.music.setLooping(True) 
     36            self.music_init = True 
    3537        self.music.play() 
    3638        self.music_on = True 
    37      
     39 
    3840    def pauseMusic(self): 
    3941        """Stop current playback""" 
    40         self.music.pause() 
    41         self.music_on = False 
     42        if(self.music_init == True): 
     43            self.music.pause() 
     44            self.music_on = False 
    4245 
    4346    def toggleMusic(self): 
    44         if(self.music_on == False): 
     47        if((self.music_on == False)and(self.music_init == True)): 
    4548            self.playMusic() 
    4649        else: 
Note: See TracChangeset for help on using the changeset viewer.