teleport transition and npc transition update

This commit is contained in:
Zach 2015-04-30 01:27:17 -05:00
parent 31e5ed5f7e
commit 0f06855621
2 changed files with 15 additions and 2 deletions

View file

@ -115,7 +115,7 @@ class DistributedNPCToon(DistributedNPCToonBase):
rejectString = Quests.fillInQuestNames(rejectString, avName=av.name)
self.setChatAbsolute(rejectString, CFSpeech | CFTimeout)
if isLocalToon:
self.neutralizeCamera()
base.cr.playGame.getPlace().setState('walk')
return
if mode == NPCToons.QUEST_MOVIE_TIER_NOT_DONE:
rejectString = Quests.chooseQuestDialogTierNotDone()

View file

@ -6,7 +6,7 @@ from direct.task.Task import Task
from pandac.PandaModules import *
import random
import types
import math
import AccessoryGlobals
import Motion
import TTEmote
@ -1789,6 +1789,19 @@ class Toon(Avatar.Avatar, ToonHead):
self.holeClipPath = self.attachNewNode(holeClip)
self.getGeomNode().setClipPlane(self.holeClipPath)
self.nametag3d.setClipPlane(self.holeClipPath)
avHeight = max(self.getHeight(), 3)
def lerpCam(task):
degrees = task.time * 52.941
radians = degrees * (math.pi / 180.0)
x = -12 * math.sin(radians)
y = -12 * math.cos(radians)
z = base.localAvatar.getHeight()
camera.setPos(x, y, z)
camera.setH(-degrees)
if task.time > 3.4:
return Task.done
return Task.cont
taskMgr.add(lerpCam, 'lerpCam')
self.track.start(ts)
self.setActiveShadow(0)