(svn r17500) -Fix (r16502): The wrong value was restored to SetAllowDoCommand possible resulting in an AI that wasn't allowed to do any actions

This commit is contained in:
yexo
2009-09-11 17:18:06 +00:00
parent f38bb4cdb5
commit 9218078424
3 changed files with 16 additions and 4 deletions

View File

@@ -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.");
}