From 8bad11c5408442dea885c7b096e800bb2298ccc7 Mon Sep 17 00:00:00 2001 From: Nicolas Sanchez <98576999+nicolassanchez02@users.noreply.github.com> Date: Fri, 29 May 2026 17:07:40 -0500 Subject: [PATCH] Fix golf WaitReadyHole barrier cleanup guard exitWaitReadyHole guarded its cleanup with hasattr(self, '__barrier'), but the attribute is name-mangled to _DistributedGolfCourseAI__barrier, so the check is always False and the cleanup never runs. The WaitReadyHole barrier leaks every time the FSM leaves that state. self.__barrier is initialized to None in __init__, so guard on the value instead, matching exitWaitJoin and the handleExitedAvatar path. --- toontown/golf/DistributedGolfCourseAI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toontown/golf/DistributedGolfCourseAI.py b/toontown/golf/DistributedGolfCourseAI.py index e7342a7..bb7719a 100644 --- a/toontown/golf/DistributedGolfCourseAI.py +++ b/toontown/golf/DistributedGolfCourseAI.py @@ -326,7 +326,7 @@ class DistributedGolfCourseAI(DistributedObjectAI.DistributedObjectAI, FSM): def exitWaitReadyHole(self): self.notify.debugStateCall(self) - if hasattr(self, '__barrier'): + if self.__barrier: self.__barrier.cleanup() self.__barrier = None return