more estate crash fixes
This commit is contained in:
parent
c9495aa06d
commit
1f63c40772
4 changed files with 26 additions and 10 deletions
|
@ -85,6 +85,7 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
||||||
self.nametag2dNormalContents = Nametag.CSpeech
|
self.nametag2dNormalContents = Nametag.CSpeech
|
||||||
self.showNametag2d()
|
self.showNametag2d()
|
||||||
self.setPickable(0)
|
self.setPickable(0)
|
||||||
|
self.posCameraSeq = None
|
||||||
return
|
return
|
||||||
|
|
||||||
def useSwimControls(self):
|
def useSwimControls(self):
|
||||||
|
@ -137,7 +138,9 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
||||||
self.stopJumpLandTask()
|
self.stopJumpLandTask()
|
||||||
taskMgr.remove('shadowReach')
|
taskMgr.remove('shadowReach')
|
||||||
base.popCTrav()
|
base.popCTrav()
|
||||||
taskMgr.remove('posCamera')
|
if self.posCameraSeq:
|
||||||
|
self.posCameraSeq.finish()
|
||||||
|
self.posCameraSeq = None
|
||||||
self.disableAvatarControls()
|
self.disableAvatarControls()
|
||||||
self.stopTrackAnimToSpeed()
|
self.stopTrackAnimToSpeed()
|
||||||
self.stopUpdateSmartCamera()
|
self.stopUpdateSmartCamera()
|
||||||
|
@ -605,8 +608,11 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
||||||
r = destHpr[2]
|
r = destHpr[2]
|
||||||
camera.setPos(savePos)
|
camera.setPos(savePos)
|
||||||
camera.setHpr(saveHpr)
|
camera.setHpr(saveHpr)
|
||||||
taskMgr.remove('posCamera')
|
if self.posCameraSeq:
|
||||||
camera.lerpPosHpr(x, y, z, h, p, r, time, task='posCamera')
|
self.posCameraSeq.finish()
|
||||||
|
self.posCameraSeq = None
|
||||||
|
self.posCameraSeq = camera.posHprInterval(time, Point3(x, y, z), Point3(h, p, r), name='posCamera')
|
||||||
|
self.posCameraSeq.start()
|
||||||
|
|
||||||
def getClampedAvatarHeight(self):
|
def getClampedAvatarHeight(self):
|
||||||
return max(self.getHeight(), 3.0)
|
return max(self.getHeight(), 3.0)
|
||||||
|
|
|
@ -50,6 +50,7 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem):
|
||||||
self.topDeleted = 0
|
self.topDeleted = 0
|
||||||
self.bottomDeleted = 0
|
self.bottomDeleted = 0
|
||||||
self.closetTrack = None
|
self.closetTrack = None
|
||||||
|
self.lerpCameraSeq = None
|
||||||
self.avMoveTrack = None
|
self.avMoveTrack = None
|
||||||
self.scale = 1.0
|
self.scale = 1.0
|
||||||
self.fsm = ClassicFSM.ClassicFSM('Closet', [State.State('off', self.enterOff, self.exitOff, ['ready', 'open', 'closed']),
|
self.fsm = ClassicFSM.ClassicFSM('Closet', [State.State('off', self.enterOff, self.exitOff, ['ready', 'open', 'closed']),
|
||||||
|
@ -105,7 +106,9 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem):
|
||||||
self.ignore(self.closetSphereEnterEvent)
|
self.ignore(self.closetSphereEnterEvent)
|
||||||
self.ignoreAll()
|
self.ignoreAll()
|
||||||
taskMgr.remove(self.uniqueName('popupChangeClothesGUI'))
|
taskMgr.remove(self.uniqueName('popupChangeClothesGUI'))
|
||||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
if self.lerpCameraSeq:
|
||||||
|
self.lerpCameraSeq.finish()
|
||||||
|
self.lerpCameraSeq = None
|
||||||
taskMgr.remove(self.uniqueName('lerpToon'))
|
taskMgr.remove(self.uniqueName('lerpToon'))
|
||||||
if self.closetTrack:
|
if self.closetTrack:
|
||||||
self.closetTrack.finish()
|
self.closetTrack.finish()
|
||||||
|
@ -154,7 +157,10 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem):
|
||||||
self._openDoors()
|
self._openDoors()
|
||||||
if self.customerId == base.localAvatar.doId:
|
if self.customerId == base.localAvatar.doId:
|
||||||
camera.wrtReparentTo(self)
|
camera.wrtReparentTo(self)
|
||||||
camera.lerpPosHpr(-7.58, -6.02, 6.9, 286.3, 336.8, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera'))
|
quat = Quat()
|
||||||
|
quat.setHpr((286.3, 336.8, 0))
|
||||||
|
self.lerpCameraSeq = camera.posQuatInterval(1, Point3(-7.58, -6.02, 6.9), quat, other=self, blendType='easeOut', name=self.uniqueName('lerpCamera'))
|
||||||
|
self.lerpCameraSeq.start()
|
||||||
camera.setPosHpr(self, -7.58, -6.02, 6.9, 286.3, 336.8, 0)
|
camera.setPosHpr(self, -7.58, -6.02, 6.9, 286.3, 336.8, 0)
|
||||||
if self.av:
|
if self.av:
|
||||||
if self.avMoveTrack:
|
if self.avMoveTrack:
|
||||||
|
@ -252,7 +258,9 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem):
|
||||||
def resetCloset(self):
|
def resetCloset(self):
|
||||||
self.ignoreAll()
|
self.ignoreAll()
|
||||||
taskMgr.remove(self.uniqueName('popupChangeClothesGUI'))
|
taskMgr.remove(self.uniqueName('popupChangeClothesGUI'))
|
||||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
if self.lerpCameraSeq:
|
||||||
|
self.lerpCameraSeq.finish()
|
||||||
|
self.lerpCameraSeq = None
|
||||||
taskMgr.remove(self.uniqueName('lerpToon'))
|
taskMgr.remove(self.uniqueName('lerpToon'))
|
||||||
if self.closetGUI:
|
if self.closetGUI:
|
||||||
self.closetGUI.hideButtons()
|
self.closetGUI.hideButtons()
|
||||||
|
@ -393,7 +401,9 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem):
|
||||||
self.freeAvatar()
|
self.freeAvatar()
|
||||||
return
|
return
|
||||||
elif mode == ClosetGlobals.CLOSET_MOVIE_TIMEOUT:
|
elif mode == ClosetGlobals.CLOSET_MOVIE_TIMEOUT:
|
||||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
if self.lerpCameraSeq:
|
||||||
|
self.lerpCameraSeq.finish()
|
||||||
|
self.lerpCameraSeq = None
|
||||||
taskMgr.remove(self.uniqueName('lerpToon'))
|
taskMgr.remove(self.uniqueName('lerpToon'))
|
||||||
if self.isLocalToon:
|
if self.isLocalToon:
|
||||||
self.ignore(self.purchaseDoneEvent)
|
self.ignore(self.purchaseDoneEvent)
|
||||||
|
|
|
@ -14,7 +14,7 @@ class DirectRegion(NodePath):
|
||||||
|
|
||||||
def destroy(self):
|
def destroy(self):
|
||||||
self.unload()
|
self.unload()
|
||||||
self.parent = None
|
self._parent = None
|
||||||
return
|
return
|
||||||
|
|
||||||
def setBounds(self, *bounds):
|
def setBounds(self, *bounds):
|
||||||
|
@ -94,7 +94,7 @@ class FlowerPhoto(NodePath):
|
||||||
self.fish = None
|
self.fish = None
|
||||||
del self.soundTrack
|
del self.soundTrack
|
||||||
del self.track
|
del self.track
|
||||||
self.parent = None
|
self._parent = None
|
||||||
return
|
return
|
||||||
|
|
||||||
def update(self, species, variety):
|
def update(self, species, variety):
|
||||||
|
|
|
@ -503,7 +503,7 @@ def getShovelPower(shovel, shovelSkill):
|
||||||
gardenNotify.warning("this shouldn't happen shovelSkill %d >= skill %d" % (shovelSkill, skill))
|
gardenNotify.warning("this shouldn't happen shovelSkill %d >= skill %d" % (shovelSkill, skill))
|
||||||
shovelSkill = skill - 1
|
shovelSkill = skill - 1
|
||||||
skillPtPerBox = skill / curBoxes
|
skillPtPerBox = skill / curBoxes
|
||||||
numBoxes += 1 + int(shovelSkill) / int(skillPtPerBox)
|
numBoxes += 1 + int(shovelSkill) // int(skillPtPerBox)
|
||||||
else:
|
else:
|
||||||
numBoxes += curBoxes
|
numBoxes += curBoxes
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue