coghq: Fix #41.

This commit is contained in:
Sam Edwards 2014-05-01 16:11:42 -06:00
parent 12198f2e98
commit c9fc99f732
3 changed files with 7 additions and 3 deletions

View file

@ -65,13 +65,14 @@ class CogHQExterior(BattlePlace.BattlePlace):
BattlePlace.BattlePlace.unload(self)
def enter(self, requestStatus):
if not self.dnaFile is None:
if self.dnaFile is not None:
dna = loader.loadDNA(self.dnaFile)
visgroups = DNAUtil.getVisGroups(dna)
visZones = []
for vg in visgroups:
if vg.getZone() == dna.zone:
visZones = vg.vis
visZones = vg.getVisibleZones()
break
self.visInterest = base.cr.addInterest(base.localAvatar.defaultShard, visZones, 'cogHQVis')
self.zoneId = requestStatus['zoneId']
BattlePlace.BattlePlace.enter(self)

View file

@ -169,7 +169,7 @@ class FactoryExterior(BattlePlace.BattlePlace):
visZones = []
for vg in self.visGroups:
if vg.getZone() == zone:
visZones = vg.vis
visZones = vg.getVisibleZones()
visZones.append(ToontownGlobals.SellbotFactoryExt) # :dolphin:
break
if not self.visInterest:

View file

@ -18,6 +18,9 @@ class DNAVisGroup(DNAGroup):
else:
return int(self.zone)
def getVisibleZones(self):
return map(int, self.vis)
def _storeData(self, data):
# Store the VisGroup's existence into the DNASceneData:
data.visgroups.append(self)