fix party cannons

This commit is contained in:
Open Toontown 2022-01-18 23:00:30 -05:00
parent 556ad03dab
commit 50a3720b83

View file

@ -261,12 +261,7 @@ class DistributedPartyCannonActivity(DistributedPartyActivity):
return Task.done return Task.done
if self.isLocalToonId(toonId): if self.isLocalToonId(toonId):
self.inWater = 0 self.inWater = 0
flightResults = self.__calcFlightResults(cannon, toonId, launchTime) startPos, startHpr, startVel, trajectory = self.__calcFlightResults(cannon, toonId, launchTime)
if not __debug__ or __execWarnings__:
print('EXECWARNING DistributedPartyCannonActivity: %s' % flightResults)
printStack()
for key in flightResults:
exec("%s = flightResults['%s']" % (key, key))
self.notify.debug('start position: ' + str(startPos)) self.notify.debug('start position: ' + str(startPos))
self.notify.debug('start velocity: ' + str(startVel)) self.notify.debug('start velocity: ' + str(startVel))
@ -376,10 +371,7 @@ class DistributedPartyCannonActivity(DistributedPartyActivity):
quantizeVec(startVel, self.NetDivisor) quantizeVec(startVel, self.NetDivisor)
trajectory = Trajectory.Trajectory(launchTime, startPos, startVel) trajectory = Trajectory.Trajectory(launchTime, startPos, startVel)
self.trajectory = trajectory self.trajectory = trajectory
return {'startPos': startPos, return startPos, startHpr, startVel, trajectory
'startHpr': startHpr,
'startVel': startVel,
'trajectory': trajectory}
def __shootTask(self, task): def __shootTask(self, task):
task.info['cannon'].fire() task.info['cannon'].fire()