diff options
author | krzys-h <krzys_h@interia.pl> | 2013-12-25 19:13:15 +0100 |
---|---|---|
committer | krzys-h <krzys_h@interia.pl> | 2013-12-25 19:13:15 +0100 |
commit | f1e267b18e89efde079421b8907f8f793998da3e (patch) | |
tree | 8310bbbafc4c5e72d57ed12ebef34956b4b2a94f /src | |
parent | d0285d688615beb62a5b9e742b8d4103371695c5 (diff) | |
download | colobot-f1e267b18e89efde079421b8907f8f793998da3e.tar.gz colobot-f1e267b18e89efde079421b8907f8f793998da3e.tar.bz2 colobot-f1e267b18e89efde079421b8907f8f793998da3e.zip |
Fixed bug #240 - CAuto in produce()
Diffstat (limited to 'src')
-rw-r--r-- | src/script/script.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/script/script.cpp b/src/script/script.cpp index 5cd21f9..1a70699 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -1916,7 +1916,14 @@ bool CScript::rProduce(CBotVar* var, CBotVar* result, int& exception, void* user result->SetValInt(1); // error return true; } - object->SetActivity(false); + object->SetActivity(true); + + CAuto* automat = object->GetAuto(); + if (automat != nullptr) + { + automat->Init(); + } + script->m_main->CreateShortcuts(); } else if ( type == OBJECT_FLAGb || |