(svn r17223) -Change [NoAI] [FS#2980]: Crash an AI when it uses a DoCommand / Sleep instead of just printing an error message in the AI Debug Window

This commit is contained in:
yexo
2009-08-19 16:14:15 +00:00
parent 0780dc8138
commit a4afa140f3
8 changed files with 46 additions and 5 deletions

View File

@@ -352,6 +352,10 @@ void AIInstance::GameLoop()
} catch (AI_VMSuspend e) {
this->suspend = e.GetSuspendTime();
this->callback = e.GetSuspendCallback();
} catch (AI_FatalError e) {
this->engine->ThrowError(e.GetErrorMessage());
this->engine->ResumeError();
this->Died();
}
this->is_started = true;
@@ -368,6 +372,10 @@ void AIInstance::GameLoop()
} catch (AI_VMSuspend e) {
this->suspend = e.GetSuspendTime();
this->callback = e.GetSuspendCallback();
} catch (AI_FatalError e) {
this->engine->ThrowError(e.GetErrorMessage());
this->engine->ResumeError();
this->Died();
}
}