kill crash 817829, crash on report when in boss battle

This commit is contained in:
Redmond Urbino 2008-07-14 22:46:06 +00:00
parent 0dfb31f129
commit ea863f74c2

View File

@ -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