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.
This commit is contained in:
parent
a5ecbb8b1e
commit
8bad11c540
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue