From 840d2bdc6eaee942f80bf8d2ac342e78e200c1a6 Mon Sep 17 00:00:00 2001 From: Samir Naik Date: Fri, 4 Mar 2005 04:22:02 +0000 Subject: [PATCH] wrtReparent to parent --- direct/src/distributed/DistributedNode.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/direct/src/distributed/DistributedNode.py b/direct/src/distributed/DistributedNode.py index b4632b6501..fe129c1564 100644 --- a/direct/src/distributed/DistributedNode.py +++ b/direct/src/distributed/DistributedNode.py @@ -39,7 +39,9 @@ class DistributedNode(DistributedObject.DistributedObject, NodePath): # reparent to parent parent = base.cr.doId2do.get(parentId) if parent and isinstance(parent, NodePath): - self.reparentTo(parent) + if self.getParent() != parent: + print "generate: reparenting %s to %s" % (self, parent) + self.wrtReparentTo(parent) def __cmp__(self, other):