From 06f65e5d6002536716f8acce83632e5bce9babc3 Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Sun, 14 Dec 2003 05:06:11 +0000 Subject: [PATCH] dont be in 2 pending reparents at once --- direct/src/distributed/ParentMgr.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/direct/src/distributed/ParentMgr.py b/direct/src/distributed/ParentMgr.py index fce871e82f..330b693a79 100644 --- a/direct/src/distributed/ParentMgr.py +++ b/direct/src/distributed/ParentMgr.py @@ -42,6 +42,15 @@ class ParentMgr: self.notify.debug("performing wrtReparent of %s to '%s'" % (repr(child), parentToken)) child.wrtReparentTo(self.token2nodepath[parentToken]) + + # Since you can only be under one parent at a time any time we + # see a successful request, let's clear you out of everybody + # else's pendingChildren + for key in self.pendingChildren.keys(): + childList = self.pendingChildren[key] + if child in childList: + # take him out of the list + del childList[childList.index(child)] else: self.notify.warning( "child %s requested reparent to '%s', not in list" %