From 443233ad1d9c92bc2096ca2700044b5a331488d7 Mon Sep 17 00:00:00 2001 From: John Cote Date: Wed, 10 Jun 2015 22:35:16 -0400 Subject: [PATCH] ButterflyAI cleanup gg Disney and their unneeded imports --- toontown/safezone/DistributedButterflyAI.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/toontown/safezone/DistributedButterflyAI.py b/toontown/safezone/DistributedButterflyAI.py index 7c1ab322..7e6a748e 100755 --- a/toontown/safezone/DistributedButterflyAI.py +++ b/toontown/safezone/DistributedButterflyAI.py @@ -1,13 +1,9 @@ from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI -from otp.ai.AIBase import * -from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State -from direct.fsm import State from direct.task import Task -import ButterflyGlobals -import random +import ButterflyGlobals, random class DistributedButterflyAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory("DistributedButterflyAI") @@ -23,15 +19,11 @@ class DistributedButterflyAI(DistributedObjectAI): return None def delete(self): - try: - self.butterfly_deleted - except: - self.butterfly_deleted = 1 - ButterflyGlobals.recycleIndex(self.curIndex, self.playground, self.area, self.ownerId) - ButterflyGlobals.recycleIndex(self.destIndex, self.playground, self.area, self.ownerId) - self.fsm.request('off') - del self.fsm - DistributedObjectAI.delete(self) + ButterflyGlobals.recycleIndex(self.curIndex, self.playground, self.area, self.ownerId) + ButterflyGlobals.recycleIndex(self.destIndex, self.playground, self.area, self.ownerId) + self.fsm.request('off') + del self.fsm + DistributedObjectAI.delete(self) def d_setState(self, stateIndex, curIndex, destIndex, time): self.sendUpdate('setState', [stateIndex,