Change nametags back to the way they were.

This commit is contained in:
Loudrob 2015-03-07 10:10:31 -05:00
parent 613e3983d3
commit 99a034ea65

View file

@ -11,8 +11,8 @@ from toontown.toontowngui.Clickable3d import Clickable3d
class Nametag3d(Nametag, Clickable3d):
SCALING_MIN_DISTANCE = 1
SCALING_MAX_DISTANCE = 200
SCALING_FACTOR = 0.085
SCALING_MAX_DISTANCE = 50
SCALING_FACTOR = 0.065
def __init__(self):
Nametag.__init__(self)
@ -105,15 +105,13 @@ class Nametag3d(Nametag, Clickable3d):
def tick(self, task):
distance = self.contents.getPos(base.cam).length()
extraScale = 1.0
if distance < self.SCALING_MIN_DISTANCE:
distance = self.SCALING_MIN_DISTANCE
elif distance > self.SCALING_MAX_DISTANCE:
extraScale = 1.4
distance = self.SCALING_MAX_DISTANCE
if distance != self.distance:
self.contents.setScale(math.sqrt(distance) * self.SCALING_FACTOR * extraScale)
self.contents.setScale(math.sqrt(distance) * self.SCALING_FACTOR)
self.distance = distance
self.updateClickRegion()