(svn r15204) -Fix (r15167): The check was a bit too restrictive, the top of the stack needs to be resetted if another function is called while the AI is running but not suspended.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
Yexo 16 years ago
parent cb7449b83c
commit 0d52f3b417

@ -194,7 +194,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 (this->vm->_suspended == 0) sq_settop(this->vm, top);
if (suspend == -1) sq_settop(this->vm, top);
return this->vm->_suspended != 0;
}

Loading…
Cancel
Save