Fix Silly Street crash

This commit is contained in:
John Cote 2015-05-18 00:28:51 -04:00
parent badea7d47e
commit 8f7978052c

View file

@ -218,11 +218,6 @@ class TownLoader(StateData.StateData):
nodePath = npc.getPath(i) nodePath = npc.getPath(i)
nodePath.wrtReparentTo(bucket) nodePath.wrtReparentTo(bucket)
npc = self.geom.findAllMatches('**/sb*:*animated_building*_DNARoot')
for i in xrange(npc.getNumPaths()):
nodePath = npc.getPath(i)
nodePath.wrtReparentTo(bucket)
def makeDictionaries(self, dnaStore): def makeDictionaries(self, dnaStore):
self.nodeDict = {} self.nodeDict = {}
self.zoneDict = {} self.zoneDict = {}
@ -338,24 +333,6 @@ class TownLoader(StateData.StateData):
else: else:
self.notify.error('already have interactive prop %s in zone %s' % (self.zoneIdToInteractivePropDict, zoneId)) self.notify.error('already have interactive prop %s in zone %s' % (self.zoneIdToInteractivePropDict, zoneId))
animatedBuildingNodes = i.findAllMatches('**/*:animated_building_*;-h')
for np in animatedBuildingNodes:
if np.getName().startswith('sb'):
animatedBuildingNodes.removePath(np)
numAnimatedBuildingNodes = animatedBuildingNodes.getNumPaths()
for j in xrange(numAnimatedBuildingNodes):
animatedBuildingNode = animatedBuildingNodes.getPath(j)
className = 'GenericAnimatedBuilding'
symbols = {}
base.cr.importModule(symbols, 'toontown.hood', [className])
classObj = getattr(symbols[className], className)
animatedBuildingObj = classObj(animatedBuildingNode)
animPropList = self.animPropDict.get(i)
if animPropList is None:
animPropList = self.animPropDict.setdefault(i, [])
animPropList.append(animatedBuildingObj)
return return
def deleteAnimatedProps(self): def deleteAnimatedProps(self):