diff --git a/toontown/estate/DistributedPhone.py b/toontown/estate/DistributedPhone.py index cf93dfd..c4782ca 100644 --- a/toontown/estate/DistributedPhone.py +++ b/toontown/estate/DistributedPhone.py @@ -44,6 +44,7 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): self.intervalAvatar = None self.phoneInUse = 0 self.origToonHpr = None + self.lerpCameraSeq = None return def announceGenerate(self): @@ -116,7 +117,10 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): def setupCamera(self, mode): camera.wrtReparentTo(render) if mode == PhoneGlobals.PHONE_MOVIE_PICKUP: - camera.lerpPosHpr(4, -4, base.localAvatar.getHeight() - 0.5, 35, -8, 0, 1, other=base.localAvatar, blendType='easeOut', task=self.uniqueName('lerpCamera')) + quat = Quat() + quat.setHpr((35, -8, 0)) + self.lerpCameraSeq = camera.posQuatInterval(1, Point3(4, -4, base.localAvatar.getHeight() - 0.5), quat, other=base.localAvatar, blendType='easeOut', name=self.uniqueName('lerpCamera')) + self.lerpCameraSeq.start() def setupCord(self): if self.cord: @@ -190,7 +194,9 @@ class DistributedPhone(DistributedFurnitureItem.DistributedFurnitureItem): def freeAvatar(self): if self.hasLocalAvatar: base.localAvatar.speed = 0 - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None base.localAvatar.posCamera(0, 0) if base.cr.playGame.place != None: base.cr.playGame.getPlace().setState('walk') diff --git a/toontown/toon/LocalToon.py b/toontown/toon/LocalToon.py index 8a52725..5700367 100644 --- a/toontown/toon/LocalToon.py +++ b/toontown/toon/LocalToon.py @@ -167,6 +167,7 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.physControls.event.addAgainPattern('again%in') self.oldPos = None self.questMap = None + self.lerpFurnitureButton = None def wantLegacyLifter(self): return True @@ -293,7 +294,9 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.__piePowerMeter.destroy() self.__piePowerMeter = None taskMgr.remove('unlockGardenButtons') - taskMgr.remove('lerpFurnitureButton') + if self.lerpFurnitureButton: + self.lerpFurnitureButton.finish() + self.lerpFurnitureButton = None if self.__furnitureGui: self.__furnitureGui.destroy() del self.__furnitureGui @@ -1179,8 +1182,11 @@ class LocalToon(DistributedToon.DistributedToon, LocalAvatar.LocalAvatar): self.__furnitureGui.setScale(0.06) elif self.cr.furnitureManager != None: self.showFurnitureGui() - taskMgr.remove('lerpFurnitureButton') - self.__furnitureGui.lerpPosHprScale(pos=Point3(-1.19, 0.0, 0.33), hpr=Vec3(0.0, 0.0, 0.0), scale=Vec3(0.04, 0.04, 0.04), time=1.0, blendType='easeInOut', task='lerpFurnitureButton') + if self.lerpFurnitureButton: + self.lerpFurnitureButton.finish() + self.lerpFurnitureButton = None + self.lerpFurnitureButton = self.__furnitureGui.posHprScaleInterval(pos=Point3(-1.19, 0.0, 0.33), hpr=Vec3(0.0, 0.0, 0.0), scale=Vec3(0.04, 0.04, 0.04), duration=1.0, blendType='easeInOut', name='lerpFurnitureButton') + self.lerpFurnitureButton.start() if hasattr(self, 'inEstate') and self.inEstate: self.loadGardeningGui() self.hideGardeningGui()