Don't hide laff meter based on full hp

This commit is contained in:
John 2015-06-07 20:37:25 +03:00 committed by Loudrob
parent 8262d5afa4
commit 90a8e5a2f2
2 changed files with 2 additions and 11 deletions

View file

@ -6,7 +6,7 @@ from toontown.toonbase import ToontownIntervals
class LaffMeter(DirectFrame): class LaffMeter(DirectFrame):
deathColor = Vec4(0.58039216, 0.80392157, 0.34117647, 1.0) deathColor = Vec4(0.58039216, 0.80392157, 0.34117647, 1.0)
def __init__(self, avdna, hp, maxHp, hideFull=False): def __init__(self, avdna, hp, maxHp):
DirectFrame.__init__(self, relief=None, sortOrder=50) DirectFrame.__init__(self, relief=None, sortOrder=50)
self.initialiseoptions(LaffMeter) self.initialiseoptions(LaffMeter)
self.container = DirectFrame(parent=self, relief=None) self.container = DirectFrame(parent=self, relief=None)
@ -14,7 +14,6 @@ class LaffMeter(DirectFrame):
self.av = None self.av = None
self.hp = hp self.hp = hp
self.maxHp = maxHp self.maxHp = maxHp
self.hideFull = hideFull
self.__obscured = 0 self.__obscured = 0
if self.style.type == 't': if self.style.type == 't':
self.isToon = 1 self.isToon = 1
@ -166,14 +165,6 @@ class LaffMeter(DirectFrame):
self.adjustText() self.adjustText()
if not quietly: if not quietly:
self.animatedEffect(delta) self.animatedEffect(delta)
self.checkVisibility()
def checkVisibility(self):
if self.hideFull:
if self.hp >= self.maxHp:
self.hide()
else:
self.show()
def start(self): def start(self):
if self.av: if self.av:

View file

@ -3019,7 +3019,7 @@ class Toon(Avatar.Avatar, ToonHead):
if self.headMeter: if self.headMeter:
return return
self.headMeter = LaffMeter.LaffMeter(self.style, self.getHp(), self.getMaxHp(), True) self.headMeter = LaffMeter.LaffMeter(self.style, self.getHp(), self.getMaxHp())
self.headMeter.av = self self.headMeter.av = self
self.headMeter.reparentTo(self) self.headMeter.reparentTo(self)
self.headMeter.setPos(0, 0, self.getHeight() + 1.3) self.headMeter.setPos(0, 0, self.getHeight() + 1.3)