diff options
author | yexo <yexo@openttd.org> | 2009-08-20 10:39:39 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-08-20 10:39:39 +0000 |
commit | 14b5862c229a7003fbb0dc259386dc1153048c56 (patch) | |
tree | 7b9b888a24c43d2028d72eb4b44c1b284cbfb094 /src/ai/ai_instance.cpp | |
parent | 0960f15c7ed46ac71881456ed71dfcd0a33ae4bb (diff) | |
download | openttd-14b5862c229a7003fbb0dc259386dc1153048c56.tar.xz |
(svn r17230) -Fix (r15027): don't assert when an AI uses AI*Mode objects incorrectly but crash the AI instead
Diffstat (limited to 'src/ai/ai_instance.cpp')
-rw-r--r-- | src/ai/ai_instance.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp index a5ef5135b..6e1ffa0c1 100644 --- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -353,6 +353,7 @@ void AIInstance::GameLoop() this->suspend = e.GetSuspendTime(); this->callback = e.GetSuspendCallback(); } catch (AI_FatalError e) { + this->is_dead = true; this->engine->ThrowError(e.GetErrorMessage()); this->engine->ResumeError(); this->Died(); @@ -373,6 +374,7 @@ void AIInstance::GameLoop() this->suspend = e.GetSuspendTime(); this->callback = e.GetSuspendCallback(); } catch (AI_FatalError e) { + this->is_dead = true; this->engine->ThrowError(e.GetErrorMessage()); this->engine->ResumeError(); this->Died(); |