diff --git a/toontown/coghq/DistributedLawbotCannon.py b/toontown/coghq/DistributedLawbotCannon.py index f62b413..f384bc8 100644 --- a/toontown/coghq/DistributedLawbotCannon.py +++ b/toontown/coghq/DistributedLawbotCannon.py @@ -9,6 +9,7 @@ from toontown.estate import DistributedCannon from toontown.estate import CannonGlobals from direct.gui.DirectGui import * from pandac.PandaModules import * +from libotp import * from toontown.toon import NPCToons from toontown.toon import ToonHead from toontown.toonbase import TTLocalizer @@ -667,12 +668,7 @@ class DistributedLawbotCannon(DistributedObject.DistributedObject): avId = task.avId if self.toonHead == None or not self.boss.state == 'BattleTwo': return Task.done - flightResults = self.__calcFlightResults(avId, launchTime) - if not isClient(): - print('EXECWARNING DistributedLawbotCannon: %s' % flightResults) - printStack() - for key in flightResults: - exec("%s = flightResults['%s']" % (key, key)) + startPos, startHpr, startVel, trajectory, timeOfImpact, hitWhat = self.__calcFlightResults(avId, launchTime) self.notify.debug('start position: ' + str(startPos)) self.notify.debug('start velocity: ' + str(startVel)) @@ -744,12 +740,7 @@ class DistributedLawbotCannon(DistributedObject.DistributedObject): trajectory = Trajectory.Trajectory(launchTime, startPos, startVel) self.trajectory = trajectory timeOfImpact, hitWhat = self.__calcToonImpact(trajectory) - return {'startPos': startPos, - 'startHpr': startHpr, - 'startVel': startVel, - 'trajectory': trajectory, - 'timeOfImpact': 3 * timeOfImpact, - 'hitWhat': hitWhat} + return startPos, startHpr, startVel, trajectory, 3 * timeOfImpact, hitWhat def __calcToonImpact(self, trajectory): t_groundImpact = trajectory.checkCollisionWithGround(GROUND_PLANE_MIN)