mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-10-31 00:37:54 +00:00
Change nametags back to the way they were.
This commit is contained in:
parent
613e3983d3
commit
99a034ea65
1 changed files with 3 additions and 5 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue