Fixed loading scripts in produce() (#418)

master
krzys-h 2015-01-08 19:21:02 +01:00
parent 927df668dc
commit 0ee86c3d15
1 changed files with 3 additions and 1 deletions

View File

@ -1702,7 +1702,9 @@ bool CScriptFunctions::rProduce(CBotVar* var, CBotVar* result, int& exception, v
if (name[0] != 0)
{
object->ReadProgram(0, static_cast<const char*>(name));
//TODO: Add %lvl% support
std::string name2 = std::string("ai/")+name;
object->ReadProgram(0, name2.c_str());
object->RunProgram(0);
}