Pārlūkot izejas kodu

worst-case hack for production: always include toon's zone in the viz list

Darren Ranalli 22 gadi atpakaļ
vecāks
revīzija
b0ac50a6f9
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. 10 0
      direct/src/level/DistributedLevel.py

+ 10 - 0
direct/src/level/DistributedLevel.py

@@ -557,6 +557,16 @@ class DistributedLevel(DistributedObject.DistributedObject,
         visibleZoneNums = list2dict([zoneNum])
         visibleZoneNums = list2dict([zoneNum])
         visibleZoneNums.update(list2dict(zoneEnt.getVisibleZoneNums()))
         visibleZoneNums.update(list2dict(zoneEnt.getVisibleZoneNums()))
 
 
+        if not __debug__:
+            # HACK
+            # make sure that the visibility list includes the zone that the toon
+            # is standing in
+            if self.lastToonZone not in visibleZoneNums:
+                self.notify.warning('adding zoneNum %s to visibility list '
+                                    'because toon is standing in that zone!' %
+                                    self.lastToonZone)
+                visibleZoneNums.update(list2dict([self.lastToonZone]))
+
         # we should not have the uberZone in the list at this point
         # we should not have the uberZone in the list at this point
         assert not 0 in visibleZoneNums
         assert not 0 in visibleZoneNums