Sfoglia il codice sorgente

go to new zone if moved

Darren Ranalli 22 anni fa
parent
commit
03795f447a
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7 0
      direct/src/level/DistributedEntityAI.py

+ 7 - 0
direct/src/level/DistributedEntityAI.py

@@ -30,3 +30,10 @@ class DistributedEntityAI(DistributedObjectAI.DistributedObjectAI,
 
     def getEntId(self):
         return self.entId
+
+    if __debug__:
+        def setParentEntId(self, parentEntId):
+            self.parentEntId = parentEntId
+            # switch to new zone
+            newZoneId = self.getZoneEntity().getZoneId()
+            self.sendSetZone(newZoneId)