From 3666947d2b145752141f97d752711db655f3487d Mon Sep 17 00:00:00 2001 From: Open Toontown <57279094+opentoontown@users.noreply.github.com> Date: Sun, 16 Jan 2022 18:10:51 -0500 Subject: [PATCH] More fixes --- toontown/shtiker/SuitPage.py | 4 ++-- toontown/toon/DistributedNPCToon.py | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/toontown/shtiker/SuitPage.py b/toontown/shtiker/SuitPage.py index 64976a5..da9a3ae 100644 --- a/toontown/shtiker/SuitPage.py +++ b/toontown/shtiker/SuitPage.py @@ -468,9 +468,9 @@ class SuitPage(ShtikerPage.ShtikerPage): quota = str(COG_QUOTAS[1][index % SuitDNA.suitsPerDept]) panel.quotaLabel['text'] = TTLocalizer.SuitPageQuota % (count, quota) elif status == COG_COMPLETE1: - panel['image_color'] = PANEL_COLORS_COMPLETE1[index / SuitDNA.suitsPerDept] + panel['image_color'] = PANEL_COLORS_COMPLETE1[index // SuitDNA.suitsPerDept] elif status == COG_COMPLETE2: - panel['image_color'] = PANEL_COLORS_COMPLETE2[index / SuitDNA.suitsPerDept] + panel['image_color'] = PANEL_COLORS_COMPLETE2[index // SuitDNA.suitsPerDept] def updateAllCogs(self, status): for index in range(0, len(base.localAvatar.cogs)): diff --git a/toontown/toon/DistributedNPCToon.py b/toontown/toon/DistributedNPCToon.py index 89fb23d..23c7220 100644 --- a/toontown/toon/DistributedNPCToon.py +++ b/toontown/toon/DistributedNPCToon.py @@ -15,6 +15,7 @@ class DistributedNPCToon(DistributedNPCToonBase): self.curQuestMovie = None self.questChoiceGui = None self.trackChoiceGui = None + self.lerpCameraSeq = None return def delayDelete(self): @@ -86,7 +87,9 @@ class DistributedNPCToon(DistributedNPCToonBase): self.detectAvatars() self.initPos() if isLocalToon: - taskMgr.remove(self.uniqueName('lerpCamera')) + if self.lerpCameraSeq: + self.lerpCameraSeq.finish() + self.lerpCameraSeq = None base.localAvatar.posCamera(0, 0) base.cr.playGame.getPlace().setState('walk') self.sendUpdate('setMovieDone', []) @@ -96,9 +99,15 @@ class DistributedNPCToon(DistributedNPCToonBase): def setupCamera(self, mode): camera.wrtReparentTo(render) if mode == NPCToons.QUEST_MOVIE_QUEST_CHOICE or mode == NPCToons.QUEST_MOVIE_TRACK_CHOICE: - camera.lerpPosHpr(5, 9, self.getHeight() - 0.5, 155, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera')) + quat = Quat() + quat.setHpr((155, -2, 0)) + self.lerpCameraSeq = camera.posQuatInterval(1, Point3(5, 9, self.getHeight() - 0.5), quat, other=self, blendType='easeOut', name=self.uniqueName('lerpCamera')) + self.lerpCameraSeq.start() else: - camera.lerpPosHpr(-5, 9, self.getHeight() - 0.5, -150, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera')) + quat = Quat() + quat.setHpr((-150, -2, 0)) + self.lerpCameraSeq = camera.posQuatInterval(1, Point3(-5, 9, self.getHeight() - 0.5), quat, other=self, blendType='easeOut', name=self.uniqueName('lerpCamera')) + self.lerpCameraSeq.start() def setMovie(self, mode, npcId, avId, quests, timestamp): timeStamp = ClockDelta.globalClockDelta.localElapsedTime(timestamp)