(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 c9a25c88fa
commit 8ef7b80719
3 changed files with 16 additions and 4 deletions

View File

@@ -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();