Changeset 438:8ee16cec0f9f


Ignore:
Timestamp:
04/09/11 17:24:40 (12 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Rebase:
38316238616630616439396630306233336162656435396331323834343732386439613830373864
Message:

Add check for whether we're still flying or invisible to recharge meters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/sprites/player.py

    r435 r438  
    399399
    400400    def discharge_level(self, tail):
    401         if tail == 'invisibility' and hasattr(self, '_invisibility_start_time'):
     401        if tail == 'invisibility' and hasattr(self, '_invisibility_start_time') and self.invisible:
    402402            start_time = self._invisibility_start_time
    403403            max_time = self._max_invisibility_time
    404         elif tail == 'flight' and hasattr(self, '_flight_start_time'):
     404        elif tail == 'flight' and hasattr(self, '_flight_start_time') and self.flying:
    405405            start_time = self._flight_start_time
    406406            max_time = self._max_flight_time
Note: See TracChangeset for help on using the changeset viewer.