ソースを参照

*** empty log message ***

Joe Shochet 25 年 前
コミット
27e79ad6db

+ 0 - 3
direct/src/distributed/ClientRepository.py

@@ -324,6 +324,3 @@ class ClientRepository(DirectObject.DirectObject):
                     cdu.func = newMethod
                     cdu.func = newMethod
                     foundIt = 1
                     foundIt = 1
         return foundIt
         return foundIt
-                    
-            
-                

+ 8 - 2
direct/src/showbase/Finder.py

@@ -66,7 +66,7 @@ def rebindClass(builtins, filename):
             parenLoc = classHeader.find('(')
             parenLoc = classHeader.find('(')
             if parenLoc > 0:
             if parenLoc > 0:
                 className = classHeader[:parenLoc]
                 className = classHeader[:parenLoc]
-                # print 'found className: ' + className
+                print 'Rebinding class name: ' + className
                 found = 1
                 found = 1
                 foundLine = i
                 foundLine = i
                 foundChar = parenLoc
                 foundChar = parenLoc
@@ -156,6 +156,12 @@ def replaceStateFunc(oldFunc, newFunc):
         print ('replaced state exit function: ' + newFunc.__name__)
         print ('replaced state exit function: ' + newFunc.__name__)
 
 
 def replaceTcrFunc(oldFunc, newFunc):
 def replaceTcrFunc(oldFunc, newFunc):
-    res = toonbase.tcr.replaceMethod(oldFunc, newFunc)
+    try:
+        res = toonbase.tcr.replaceMethod(oldFunc, newFunc)
+    except:
+        try:
+            res = simbase.air.replaceMethod(oldFunc, newFunc)
+        except:
+            res = None
     if res:
     if res:
         print ('replaced DistributedObject function: ' + newFunc.__name__)
         print ('replaced DistributedObject function: ' + newFunc.__name__)