Remove prototype flying game

This commit is contained in:
John Cote 2015-04-28 23:01:52 -04:00
parent 3bc9a90157
commit d49c95731c

View file

@ -159,7 +159,7 @@ class CogdoFlyingLevel(DirectObject):
if quadNum >= 0:
if quadNum > 0:
self.quadrants[max(quadNum - self.quadVisibiltyBehind, 0)].onstage()
for i in range(quadNum, min(quadNum + self.quadVisibiltyAhead + 1, self._numQuads)):
for i in xrange(quadNum, min(quadNum + self.quadVisibiltyAhead + 1, self._numQuads)):
self.quadrants[i].onstage()
self.visibleQuadIndices.append(i)
if i == 0:
@ -193,7 +193,6 @@ class CogdoFlyingLevelFactory:
self.quadVisibiltyAhead = quadVisibilityAhead
self.quadVisibiltyBehind = quadVisibiltyBehind
self._rng = rng or RandomNumGen(1)
self.isOrg = self._rng.randint(0, 1)
self._level = None
return
@ -201,8 +200,7 @@ class CogdoFlyingLevelFactory:
levelNode = NodePath('level')
frameModel = CogdoUtil.loadFlyingModel('level')
startPlatformModel = CogdoUtil.loadFlyingModel('levelStart')
ver = '_org' if self.isOrg else ''
endPlatformModel = CogdoUtil.loadFlyingModel('levelEnd%s' % ver)
endPlatformModel = CogdoUtil.loadFlyingModel('levelEnd')
for fan in frameModel.findAllMatches('**/*wallFan'):
fan.flattenStrong()
@ -213,7 +211,6 @@ class CogdoFlyingLevelFactory:
frameModel.find('**/wallL').setBin('opaque', 2)
frameModel.find('**/fogTranslucent_top').setBin('fixed', 2)
frameModel.getChildren().reparentTo(levelNode)
if not self.isOrg:
levelNode.hide()
self._level = CogdoFlyingLevel(self.parent, levelNode, startPlatformModel, endPlatformModel, self.quadLengthUnits, self.quadVisibiltyAhead, self.quadVisibiltyBehind)
if Globals.Dev.WantTempLevel:
@ -226,8 +223,7 @@ class CogdoFlyingLevelFactory:
quads.append(quadList[self._rng.randint(0, len(quadList) - 1)])
for i in quads:
ver = '_org' if self.isOrg else ''
filePath = CogdoUtil.getModelPath('quadrant%i%s' % (i, ver), 'flying')
filePath = CogdoUtil.getModelPath('quadrant%i' % i, 'flying')
quadModel = loader.loadModel(filePath)
for np in quadModel.findAllMatches('**/*lightCone*'):
CogdoUtil.initializeLightCone(np, 'fixed', 3)
@ -244,7 +240,4 @@ class CogdoFlyingLevelFactory:
def createLevelFog(self):
if self._level is None:
self.loadAndBuildLevel()
if self.isOrg:
return CogdoFlyingLevelFog(self._level, (0,0,0,1))
else:
return CogdoFlyingLevelFog(self._level)