mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
added ~fzone
This commit is contained in:
parent
4a5e3bea03
commit
52b35c659f
@ -387,6 +387,15 @@ class DistributedLevel(DistributedObject.DistributedObject,
|
|||||||
def getZoneNode(self, zoneEntId):
|
def getZoneNode(self, zoneEntId):
|
||||||
return self.zoneNum2node.get(zoneEntId)
|
return self.zoneNum2node.get(zoneEntId)
|
||||||
|
|
||||||
|
def warpToZone(self, zoneNum):
|
||||||
|
"""put avatar at the origin of the given zone"""
|
||||||
|
zoneNode = self.getZoneNode(zoneNum)
|
||||||
|
if zoneNode is None:
|
||||||
|
return
|
||||||
|
toonbase.localToon.setPos(zoneNode,0,0,0)
|
||||||
|
toonbase.localToon.setHpr(zoneNode,0,0,0)
|
||||||
|
self.enterZone(zoneNum)
|
||||||
|
|
||||||
def showZone(self, zoneNum):
|
def showZone(self, zoneNum):
|
||||||
zone = self.getZoneNode(zoneNum)
|
zone = self.getZoneNode(zoneNum)
|
||||||
zone.unstash()
|
zone.unstash()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user