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
if self.isLocalToonId(toonId):
self.inWater = 0
flightResults = 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))
startPos, startHpr, startVel, trajectory = self.__calcFlightResults(cannon, toonId, launchTime)
self.notify.debug('start position: ' + str(startPos))
self.notify.debug('start velocity: ' + str(startVel))
@ -376,10 +371,7 @@ class DistributedPartyCannonActivity(DistributedPartyActivity):
quantizeVec(startVel, self.NetDivisor)
trajectory = Trajectory.Trajectory(launchTime, startPos, startVel)
self.trajectory = trajectory
return {'startPos': startPos,
'startHpr': startHpr,
'startVel': startVel,
'trajectory': trajectory}
return startPos, startHpr, startVel, trajectory
def __shootTask(self, task):
task.info['cannon'].fire()