summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_object.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/api/ai_object.hpp')
-rw-r--r--src/ai/api/ai_object.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ai/api/ai_object.hpp b/src/ai/api/ai_object.hpp
index e60fc35c5..21404d7e3 100644
--- a/src/ai/api/ai_object.hpp
+++ b/src/ai/api/ai_object.hpp
@@ -140,8 +140,15 @@ protected:
static GroupID GetNewGroupID();
/**
- * Get the latest stored allow_do_command.
- * If this is false, you are not allowed to do any DoCommands.
+ * Can we suspend the AI at this moment?
+ */
+ static bool CanSuspend();
+
+ /**
+ * Get the internal value of allow_do_command. This can differ
+ * from CanSuspend() if the reason we are not allowed
+ * to execute a DoCommand is in squirrel and not the API.
+ * In that case use this function to restore the previous value.
*/
static bool GetAllowDoCommand();