(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:
@@ -18,7 +18,7 @@ public:
|
||||
AI_VMSuspend(int time, AISuspendCallbackProc *callback) :
|
||||
time(time),
|
||||
callback(callback)
|
||||
{}
|
||||
{}
|
||||
|
||||
int GetSuspendTime() { return time; }
|
||||
AISuspendCallbackProc *GetSuspendCallback() { return callback; }
|
||||
@@ -28,6 +28,21 @@ private:
|
||||
AISuspendCallbackProc *callback;
|
||||
};
|
||||
|
||||
/**
|
||||
* A throw-class that is given when the AI made a fatal error.
|
||||
*/
|
||||
class AI_FatalError {
|
||||
public:
|
||||
AI_FatalError(const char *msg) :
|
||||
msg(msg)
|
||||
{}
|
||||
|
||||
const char *GetErrorMessage() { return msg; }
|
||||
|
||||
private:
|
||||
const char *msg;
|
||||
};
|
||||
|
||||
class AIInstance {
|
||||
public:
|
||||
friend class AIObject;
|
||||
|
Reference in New Issue
Block a user