From f1e267b18e89efde079421b8907f8f793998da3e Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 25 Dec 2013 19:13:15 +0100 Subject: Fixed bug #240 - CAuto in produce() --- src/script/script.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 || -- cgit v1.2.3-1-g7c22