name the cell origins

This commit is contained in:
Joe Shochet 2005-05-11 01:08:38 +00:00
parent 67613e4278
commit cf8a0ee65d

View File

@ -24,6 +24,8 @@ class GridParent:
# to the new node, set it's position to the new grid cell origin. # to the new node, set it's position to the new grid cell origin.
self.av = av self.av = av
self.grid = None self.grid = None
# NOTE: this node gets renamed when it is put on a zone, so if you
# are looking for it by name, try cellOrigin*.
self.cellOrigin = NodePath("cellOrigin") self.cellOrigin = NodePath("cellOrigin")
def delete(self): def delete(self):
@ -62,6 +64,8 @@ class GridParent:
# Set the gridNode's position # Set the gridNode's position
self.cellOrigin.setPos(*cellPos) self.cellOrigin.setPos(*cellPos)
# For readability when debugging, append the zone to the name
self.cellOrigin.setName("cellOrigin-%s" % (zoneId))
# Reparent our avatar to this node # Reparent our avatar to this node
if not teleport: if not teleport: