coghq: Fix #41.
This commit is contained in:
parent
12198f2e98
commit
c9fc99f732
3 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue