mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
fix for jumping on lift
This commit is contained in:
parent
bc5d614be1
commit
66e56f800a
@ -301,15 +301,11 @@ class DirectDialog(DirectFrame):
|
|||||||
self.resetFrameSize()
|
self.resetFrameSize()
|
||||||
|
|
||||||
def show(self):
|
def show(self):
|
||||||
"""show(self)
|
|
||||||
"""
|
|
||||||
if self['fadeScreen']:
|
if self['fadeScreen']:
|
||||||
base.transitions.fadeScreen(self['fadeScreen'])
|
base.transitions.fadeScreen(self['fadeScreen'])
|
||||||
NodePath.show(self)
|
NodePath.show(self)
|
||||||
|
|
||||||
def hide(self):
|
def hide(self):
|
||||||
"""hide(self)
|
|
||||||
"""
|
|
||||||
if self['fadeScreen']:
|
if self['fadeScreen']:
|
||||||
base.transitions.noTransitions()
|
base.transitions.noTransitions()
|
||||||
NodePath.hide(self)
|
NodePath.hide(self)
|
||||||
@ -323,8 +319,6 @@ class DirectDialog(DirectFrame):
|
|||||||
self.configureDialog()
|
self.configureDialog()
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
"""unload(self)
|
|
||||||
"""
|
|
||||||
# Remove this panel out of the AllDialogs list
|
# Remove this panel out of the AllDialogs list
|
||||||
uniqueName = self['dialogName']
|
uniqueName = self['dialogName']
|
||||||
if DirectDialog.AllDialogs.has_key(uniqueName):
|
if DirectDialog.AllDialogs.has_key(uniqueName):
|
||||||
|
@ -98,6 +98,7 @@ class GravityWalker(DirectObject.DirectObject):
|
|||||||
self.platform.reparentTo(self.platformRoot)
|
self.platform.reparentTo(self.platformRoot)
|
||||||
|
|
||||||
startPos = Vec3(0.0, -15.0, 0.0)
|
startPos = Vec3(0.0, -15.0, 0.0)
|
||||||
|
upPos = Vec3(0.0, 0.0, 15.0)
|
||||||
endPos = Vec3(0.0, 15.0, 0.0)
|
endPos = Vec3(0.0, 15.0, 0.0)
|
||||||
distance = Vec3(startPos-endPos).length()
|
distance = Vec3(startPos-endPos).length()
|
||||||
duration = distance/4
|
duration = distance/4
|
||||||
@ -112,6 +113,17 @@ class GravityWalker(DirectObject.DirectObject):
|
|||||||
startPos, startPos=endPos,
|
startPos, startPos=endPos,
|
||||||
name='platformBack%s' % fakeId,
|
name='platformBack%s' % fakeId,
|
||||||
fluid = 1),
|
fluid = 1),
|
||||||
|
WaitInterval(0.3),
|
||||||
|
LerpPosInterval(self.platform, duration,
|
||||||
|
upPos,
|
||||||
|
name='platformOut%s' % fakeId,
|
||||||
|
fluid = 1),
|
||||||
|
WaitInterval(0.3),
|
||||||
|
LerpPosInterval(self.platform, duration,
|
||||||
|
startPos,
|
||||||
|
name='platformOut%s' % fakeId,
|
||||||
|
fluid = 1),
|
||||||
|
|
||||||
name='platformIval%s' % fakeId,
|
name='platformIval%s' % fakeId,
|
||||||
)
|
)
|
||||||
self.moveIval.loop()
|
self.moveIval.loop()
|
||||||
@ -416,7 +428,6 @@ class GravityWalker(DirectObject.DirectObject):
|
|||||||
self.__oldPosDelta.pPrintValues())
|
self.__oldPosDelta.pPrintValues())
|
||||||
velocity = self.__oldPosDelta*(1.0/self.__oldDt)
|
velocity = self.__oldPosDelta*(1.0/self.__oldDt)
|
||||||
self.priorParent = Vec3(velocity)
|
self.priorParent = Vec3(velocity)
|
||||||
self.priorParent.setZ(0.0) # The lifter handles the z value.
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
if self.wantDebugIndicator:
|
if self.wantDebugIndicator:
|
||||||
onScreenDebug.add("priorParent", self.priorParent.pPrintValues())
|
onScreenDebug.add("priorParent", self.priorParent.pPrintValues())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user