소스 검색

added detection of toon/camera room location, added geom visibility

Darren Ranalli 21 년 전
부모
커밋
6ed0fe3017
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      direct/src/level/DistributedLevel.py

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

@@ -220,6 +220,7 @@ class DistributedLevel(DistributedObject.DistributedObject,
         # the entrancePoint entities register themselves with us
         # the entrancePoint entities register themselves with us
         if self.entranceId not in self.entranceId2entity:
         if self.entranceId not in self.entranceId2entity:
             self.notify.warning('unknown entranceId %s' % self.entranceId)
             self.notify.warning('unknown entranceId %s' % self.entranceId)
+            base.localAvatar.reparentTo(render)
             base.localAvatar.setPosHpr(0,0,0,0,0,0)
             base.localAvatar.setPosHpr(0,0,0,0,0,0)
             self.notify.warning('showing all zones')
             self.notify.warning('showing all zones')
             self.setColorZones(1)
             self.setColorZones(1)
@@ -271,6 +272,11 @@ class DistributedLevel(DistributedObject.DistributedObject,
         self.zoneNumDict = list2dict(self.zoneNums)
         self.zoneNumDict = list2dict(self.zoneNums)
         DistributedLevel.notify.debug('zones from model: %s' % self.zoneNums)
         DistributedLevel.notify.debug('zones from model: %s' % self.zoneNums)
 
 
+        # give the level a chance to muck with the model before the entities
+        # get placed
+        self.fixupLevelModel()
+        
+    def fixupLevelModel(self):
         # fix up the floor collisions for walkable zones *before*
         # fix up the floor collisions for walkable zones *before*
         # any entities get put under the model
         # any entities get put under the model
         for zoneNum,zoneNode in self.zoneNum2node.items():
         for zoneNum,zoneNode in self.zoneNum2node.items():