hood: Send street viszones on quiet zone on Astron

This correctly mimics the same behavior on OTP, and improves
teleporting to friends on streets.
This commit is contained in:
Little Cat 2023-01-09 01:15:02 -04:00
parent e7fb5761d1
commit d6c98ea1a2
No known key found for this signature in database
GPG key ID: 96455BD9C4399BE8
2 changed files with 13 additions and 3 deletions

View file

@ -281,9 +281,19 @@ class QuietZoneState(StateData.StateData):
messenger.send(self.getEnterWaitForSetZoneResponseMsg(), [self._requestStatus]) messenger.send(self.getEnterWaitForSetZoneResponseMsg(), [self._requestStatus])
base.cr.handlerArgs = self._requestStatus base.cr.handlerArgs = self._requestStatus
zoneId = self._requestStatus['zoneId'] zoneId = self._requestStatus['zoneId']
where = self._requestStatus['where']
base.cr.dumpAllSubShardObjects() base.cr.dumpAllSubShardObjects()
base.cr.resetDeletedSubShardDoIds() base.cr.resetDeletedSubShardDoIds()
base.cr.sendSetZoneMsg(zoneId) if __astron__ and where == 'street':
visZones = [ZoneUtil.getBranchZone(zoneId)]
# Assuming that the DNA have been loaded by bulk load before this.
loader = base.cr.playGame.hood.loader
visZones += [loader.node2zone[x] for x in loader.nodeDict[zoneId]]
if zoneId not in visZones:
visZones.append(zoneId)
base.cr.sendSetZoneMsg(zoneId, visZones)
else:
base.cr.sendSetZoneMsg(zoneId)
self.waitForDatabase('WaitForSetZoneResponse') self.waitForDatabase('WaitForSetZoneResponse')
self.fsm.request('waitForSetZoneComplete') self.fsm.request('waitForSetZoneComplete')

View file

@ -352,8 +352,8 @@ class Street(BattlePlace.BattlePlace):
if not __astron__: if not __astron__:
base.cr.sendSetZoneMsg(newZoneId) base.cr.sendSetZoneMsg(newZoneId)
else: else:
visZones = [self.loader.node2zone[x] for x in self.loader.nodeDict[newZoneId]] visZones = [ZoneUtil.getBranchZone(newZoneId)]
visZones.append(ZoneUtil.getBranchZone(newZoneId)) visZones += [self.loader.node2zone[x] for x in self.loader.nodeDict[newZoneId]]
if newZoneId not in visZones: if newZoneId not in visZones:
visZones.append(newZoneId) visZones.append(newZoneId)
base.cr.sendSetZoneMsg(newZoneId, visZones) base.cr.sendSetZoneMsg(newZoneId, visZones)