1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-26 05:34:12 +01:00

(svn r16508) [0.7] -Backport from trunk:

- Fix: Base graphics names must be unique, so do not add duplicates (r16503)
- Fix: [NoAI] When an AI was suspended while in a function called (indirectly) via call/acall/pcall OpenTTD crashed. Fix this by disallowing AIs to be suspended while called via call/acall/pcall [FS#2935] (r16502)
This commit is contained in:
rubidium
2009-06-03 13:33:58 +00:00
parent 9456d20800
commit 65c5e26913
10 changed files with 81 additions and 9 deletions

View File

@@ -508,3 +508,8 @@ void Squirrel::ResetCrashed()
{
this->crashed = false;
}
bool Squirrel::CanSuspend()
{
return sq_can_suspend(this->vm);
}

View File

@@ -213,6 +213,11 @@ public:
* Reset the crashed status.
*/
void ResetCrashed();
/**
* Are we allowed to suspend the squirrel script at this moment?
*/
bool CanSuspend();
};
#endif /* SQUIRREL_HPP */