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.showNametag2d()
|
||||
self.setPickable(0)
|
||||
self.posCameraSeq = None
|
||||
return
|
||||
|
||||
def useSwimControls(self):
|
||||
|
@ -137,7 +138,9 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
|||
self.stopJumpLandTask()
|
||||
taskMgr.remove('shadowReach')
|
||||
base.popCTrav()
|
||||
taskMgr.remove('posCamera')
|
||||
if self.posCameraSeq:
|
||||
self.posCameraSeq.finish()
|
||||
self.posCameraSeq = None
|
||||
self.disableAvatarControls()
|
||||
self.stopTrackAnimToSpeed()
|
||||
self.stopUpdateSmartCamera()
|
||||
|
@ -605,8 +608,11 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
|
|||
r = destHpr[2]
|
||||
camera.setPos(savePos)
|
||||
camera.setHpr(saveHpr)
|
||||
taskMgr.remove('posCamera')
|
||||
camera.lerpPosHpr(x, y, z, h, p, r, time, task='posCamera')
|
||||
if self.posCameraSeq:
|
||||
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):
|
||||
return max(self.getHeight(), 3.0)
|
||||
|
|
|
@ -50,6 +50,7 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem):
|
|||
self.topDeleted = 0
|
||||
self.bottomDeleted = 0
|
||||
self.closetTrack = None
|
||||
self.lerpCameraSeq = None
|
||||
self.avMoveTrack = None
|
||||
self.scale = 1.0
|
||||
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.ignoreAll()
|
||||
taskMgr.remove(self.uniqueName('popupChangeClothesGUI'))
|
||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
||||
if self.lerpCameraSeq:
|
||||
self.lerpCameraSeq.finish()
|
||||
self.lerpCameraSeq = None
|
||||
taskMgr.remove(self.uniqueName('lerpToon'))
|
||||
if self.closetTrack:
|
||||
self.closetTrack.finish()
|
||||
|
@ -154,7 +157,10 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem):
|
|||
self._openDoors()
|
||||
if self.customerId == base.localAvatar.doId:
|
||||
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)
|
||||
if self.av:
|
||||
if self.avMoveTrack:
|
||||
|
@ -252,7 +258,9 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem):
|
|||
def resetCloset(self):
|
||||
self.ignoreAll()
|
||||
taskMgr.remove(self.uniqueName('popupChangeClothesGUI'))
|
||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
||||
if self.lerpCameraSeq:
|
||||
self.lerpCameraSeq.finish()
|
||||
self.lerpCameraSeq = None
|
||||
taskMgr.remove(self.uniqueName('lerpToon'))
|
||||
if self.closetGUI:
|
||||
self.closetGUI.hideButtons()
|
||||
|
@ -393,7 +401,9 @@ class DistributedCloset(DistributedFurnitureItem.DistributedFurnitureItem):
|
|||
self.freeAvatar()
|
||||
return
|
||||
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'))
|
||||
if self.isLocalToon:
|
||||
self.ignore(self.purchaseDoneEvent)
|
||||
|
|
|
@ -14,7 +14,7 @@ class DirectRegion(NodePath):
|
|||
|
||||
def destroy(self):
|
||||
self.unload()
|
||||
self.parent = None
|
||||
self._parent = None
|
||||
return
|
||||
|
||||
def setBounds(self, *bounds):
|
||||
|
@ -94,7 +94,7 @@ class FlowerPhoto(NodePath):
|
|||
self.fish = None
|
||||
del self.soundTrack
|
||||
del self.track
|
||||
self.parent = None
|
||||
self._parent = None
|
||||
return
|
||||
|
||||
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))
|
||||
shovelSkill = skill - 1
|
||||
skillPtPerBox = skill / curBoxes
|
||||
numBoxes += 1 + int(shovelSkill) / int(skillPtPerBox)
|
||||
numBoxes += 1 + int(shovelSkill) // int(skillPtPerBox)
|
||||
else:
|
||||
numBoxes += curBoxes
|
||||
|
||||
|
|
Loading…
Reference in a new issue