From ea863f74c288b567694b2f237cb7e583ad0b161e Mon Sep 17 00:00:00 2001 From: Redmond Urbino Date: Mon, 14 Jul 2008 22:46:06 +0000 Subject: [PATCH] kill crash 817829, crash on report when in boss battle --- direct/src/fsm/ClassicFSM.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/direct/src/fsm/ClassicFSM.py b/direct/src/fsm/ClassicFSM.py index e35f7980ea..0c257561af 100644 --- a/direct/src/fsm/ClassicFSM.py +++ b/direct/src/fsm/ClassicFSM.py @@ -167,6 +167,15 @@ class ClassicFSM(DirectObject): ClassicFSM.notify.warning("[%s]: getStateNamed: %s, no such state" % (self.__name, stateName)) + def hasStateNamed(self, stateName): + """ + Return True if stateName is a valid state, False otherwise. + """ + result = False + state = self.__states.get(stateName) + if state: + result = True + return result # basic ClassicFSM functionality