mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(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.
This commit is contained in:
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…
Reference in New Issue
Block a user