Skip to content

Commit ff8fa0b

Browse files
committed
CHG: more time for startign complex tutorials
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@11894 8aca7d54-2c30-db11-9de9-000461428c89
1 parent 0a7b5b7 commit ff8fa0b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/simutrans/dataobj/scenario.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ bool scenario_t::load_script(const char* filename)
174174
}
175175

176176
// load scenario definition
177-
if (const char* err = script->call_script(filename)) {
177+
if (const char* err = script->call_script(filename,2000000)) {
178178
dbg->error("scenario_t::load_script", "error [%s] calling %s", err, filename);
179179
return false;
180180
}

src/simutrans/script/script.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ script_vm_t::~script_vm_t()
165165
delete log;
166166
}
167167

168-
const char* script_vm_t::call_script(const char* filename)
168+
const char* script_vm_t::call_script(const char* filename, uint32 ops)
169169
{
170170
// load script
171171
if (!SQ_SUCCEEDED(sqstd_loadfile(vm, filename, true))) {
172172
return "Reading / compiling script failed";
173173
}
174174
// call it
175175
sq_pushroottable(vm);
176-
if (!SQ_SUCCEEDED(sq_call_restricted(vm, 1, SQFalse, SQTrue, 100000))) {
176+
if (!SQ_SUCCEEDED(sq_call_restricted(vm, 1, SQFalse, SQTrue, ops))) {
177177
sq_pop(vm, 1); // pop script
178178
return "Call script failed";
179179
}

src/simutrans/script/script.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class script_vm_t {
3535
* loads file, calls script
3636
* @returns error msg (or NULL if succeeded)
3737
*/
38-
const char* call_script(const char* filename);
38+
const char* call_script(const char* filename, uint32 ops=100000);
3939

4040
/**
4141
* compiles and executes given string

0 commit comments

Comments
 (0)