summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_controller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/api/ai_controller.cpp')
-rw-r--r--src/ai/api/ai_controller.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_controller.cpp b/src/ai/api/ai_controller.cpp
index 88e666db4..6852e1142 100644
--- a/src/ai/api/ai_controller.cpp
+++ b/src/ai/api/ai_controller.cpp
@@ -30,7 +30,7 @@
/* static */ void AIController::Sleep(int ticks)
{
- if (!AIObject::GetAllowDoCommand()) {
+ if (!AIObject::CanSuspend()) {
throw AI_FatalError("You are not allowed to call Sleep in your constructor, Save(), Load(), and any valuator.");
}