diff options
author | truebrain <truebrain@openttd.org> | 2011-11-29 23:15:35 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-11-29 23:15:35 +0000 |
commit | 98103121d4f2ed1f1581919b7b1f343ccd410c12 (patch) | |
tree | 1e760dd6517a6b0f9fb669ec277139a8e3f9a4a3 /src/script/api/script_execmode.cpp | |
parent | afdb67a3534f85b4efbd3327ece8137211042d7b (diff) | |
download | openttd-98103121d4f2ed1f1581919b7b1f343ccd410c12.tar.xz |
(svn r23355) -Codechange: rename all AI* to Script* (Rubidium)
Diffstat (limited to 'src/script/api/script_execmode.cpp')
-rw-r--r-- | src/script/api/script_execmode.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/script/api/script_execmode.cpp b/src/script/api/script_execmode.cpp index b4631b0f0..23f4c683d 100644 --- a/src/script/api/script_execmode.cpp +++ b/src/script/api/script_execmode.cpp @@ -7,7 +7,7 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. */ -/** @file script_execmode.cpp Implementation of AIExecMode. */ +/** @file script_execmode.cpp Implementation of ScriptExecMode. */ #include "../../stdafx.h" #include "script_execmode.hpp" @@ -15,26 +15,26 @@ #include "../../company_func.h" #include "../../ai/ai_instance.hpp" -bool AIExecMode::ModeProc() +bool ScriptExecMode::ModeProc() { /* In execution mode we only return 'true', telling the DoCommand it * should continue with the real execution of the command. */ return true; } -AIExecMode::AIExecMode() +ScriptExecMode::ScriptExecMode() { this->last_mode = this->GetDoCommandMode(); this->last_instance = this->GetDoCommandModeInstance(); - this->SetDoCommandMode(&AIExecMode::ModeProc, this); + this->SetDoCommandMode(&ScriptExecMode::ModeProc, this); } -AIExecMode::~AIExecMode() +ScriptExecMode::~ScriptExecMode() { if (this->GetDoCommandModeInstance() != this) { /* Ignore this error if the AI already died. */ - if (!AIObject::GetActiveInstance()->IsDead()) { - throw AI_FatalError("AIExecMode object was removed while it was not the latest AI*Mode object created."); + if (!ScriptObject::GetActiveInstance()->IsDead()) { + throw AI_FatalError("ScriptExecMode object was removed while it was not the latest AI*Mode object created."); } } this->SetDoCommandMode(this->last_mode, this->last_instance); |