From de283ca597450d0537277e0de26a14c85e5fa248 Mon Sep 17 00:00:00 2001 From: John Cote Date: Tue, 14 Jan 2020 02:24:16 -0500 Subject: [PATCH] coghq: yup you guessed it fixed more ceo crashes --- toontown/coghq/DistributedBanquetTable.py | 2 ++ toontown/coghq/DistributedGolfSpot.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/toontown/coghq/DistributedBanquetTable.py b/toontown/coghq/DistributedBanquetTable.py index 6b6e9e1..d92776d 100644 --- a/toontown/coghq/DistributedBanquetTable.py +++ b/toontown/coghq/DistributedBanquetTable.py @@ -315,6 +315,8 @@ class DistributedBanquetTable(DistributedObject.DistributedObject, FSM.FSM, Banq foodModel.setScale(newScale) def foodDetach(self = self, diner = diner): + if not diner.getRightHand().getNumChildren(): + return foodModel = diner.getRightHand().getChild(0) (foodModel.reparentTo(serviceLoc),) (foodModel.setPosHpr(0, 0, 0, 0, 0, 0),) diff --git a/toontown/coghq/DistributedGolfSpot.py b/toontown/coghq/DistributedGolfSpot.py index 4afcde7..462e2ff 100644 --- a/toontown/coghq/DistributedGolfSpot.py +++ b/toontown/coghq/DistributedGolfSpot.py @@ -35,7 +35,7 @@ class DistributedGolfSpot(DistributedObject.DistributedObject, FSM.FSM): self.golfSpotSmoother.setSmoothMode(SmoothMover.SMOn) self.smoothStarted = 0 self.__broadcastPeriod = 0.2 - if self.index > len(self.positions): + if self.index and self.index > len(self.positions): self.notify.error('Invalid index %d' % index) self.fadeTrack = None self.setupPowerBar()