diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 20:56:50 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 20:56:50 +0000 |
commit | 83f2785f54de1c31267c5586464c97fb39f95b5a (patch) | |
tree | de073b47921321433fc0945bd63bc9c07d4a1f33 /src/script/script_instance.hpp | |
parent | cbe43abe5db481568ccf988dbe994f43a985efbd (diff) | |
download | openttd-83f2785f54de1c31267c5586464c97fb39f95b5a.tar.xz |
(svn r23611) -Add: run the begin of the script already while generating, and don't sleep on DoCommand while doing so
Diffstat (limited to 'src/script/script_instance.hpp')
-rw-r--r-- | src/script/script_instance.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script/script_instance.hpp b/src/script/script_instance.hpp index 8aa85744c..e7a23ccd9 100644 --- a/src/script/script_instance.hpp +++ b/src/script/script_instance.hpp @@ -159,6 +159,12 @@ public: */ void InsertEvent(class ScriptEvent *event); + /** + * Check if the instance is sleeping, which either happened because the + * script executed a DoCommand, or executed this.Sleep(). + */ + bool IsSleeping() { return this->suspend != 0; } + protected: class Squirrel *engine; ///< A wrapper around the squirrel vm. |