(svn r16425) -Change [FS#2869]: Stop an AI when it takes too long to initialize or load

This commit is contained in:
yexo
2009-05-25 21:55:47 +00:00
parent 9355d1d169
commit 7425bf779d
2 changed files with 12 additions and 4 deletions

View File

@@ -209,7 +209,7 @@ bool Squirrel::CallMethod(HSQOBJECT instance, const char *method_name, HSQOBJECT
if (ret != NULL) sq_getstackobj(vm, -1, ret);
/* Reset the top, but don't do so for the AI main function, as we need
* a correct stack when resuming. */
if (suspend == -1) sq_settop(this->vm, top);
if (!this->IsSuspended()) sq_settop(this->vm, top);
/* Restore the return-value location. */
this->vm->_suspended_target = last_target;