Redirect to correct area if player goes sad in a cog battle

This commit is contained in:
John 2015-05-30 18:09:59 +03:00 committed by Loudrob
parent d5fec41850
commit e3a76a4bbf

View file

@ -403,15 +403,12 @@ class DistributedToon(DistributedPlayer.DistributedPlayer, Toon.Toon, Distribute
def setDefaultZone(self, zoneId):
if zoneId >= 20000 and zoneId < 22000:
zoneId = zoneId + 2000
try:
hoodPhase = base.cr.hoodMgr.getPhaseFromHood(zoneId)
except:
self.defaultZone = ToontownGlobals.ToontownCentral
return
if ZoneUtil.getCanonicalHoodId(zoneId) == ToontownGlobals.FunnyFarm:
self.defaultZone = ToontownGlobals.ToontownCentral
return
if self.getHp() <= 0 and zoneId in ToontownGlobals.HQToSafezone:
self.defaultZone = ToontownGlobals.HQToSafezone[zoneId]
return
self.defaultZone = zoneId
def setAsGM(self, state):