krzys-h 2015-07-22 17:44:27 +02:00
parent 8e02786dbc
commit 53a4176d29
1 changed files with 1 additions and 0 deletions

View File

@ -4646,6 +4646,7 @@ void CRobotMain::LoadOneScript(CObject *obj, int &nbError)
if (CResourceManager::Exists(filename))
{
Program* program = brain->GetOrAddProgram(i);
if(brain->GetCompile(program)) continue; // If already loaded (e.g. from level file), skip
brain->ReadProgram(program, filename.c_str());
if (!brain->GetCompile(program)) nbError++;
}