diff options
author | rubidium <rubidium@openttd.org> | 2009-02-08 01:51:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-02-08 01:51:48 +0000 |
commit | 2a66e934b81e08bb72c4d57c2877632d3d253f7d (patch) | |
tree | 90b4e755d074b6d4d949c4938eb3d5177c238609 /src/script/squirrel.hpp | |
parent | 26c4a02c8b9e01974d8c211d6126b0a2f0ee9731 (diff) | |
download | openttd-2a66e934b81e08bb72c4d57c2877632d3d253f7d.tar.xz |
(svn r15406) -Fix: make Valuate actually cost a few opcodes to not make it a single opcode method of doing lots of the same thing. This should resolve most of the hiccups caused by AIs.
Diffstat (limited to 'src/script/squirrel.hpp')
-rw-r--r-- | src/script/squirrel.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/squirrel.hpp b/src/script/squirrel.hpp index fc7472e96..b5b352bd0 100644 --- a/src/script/squirrel.hpp +++ b/src/script/squirrel.hpp @@ -186,6 +186,11 @@ public: * Release a SQ object. */ void ReleaseObject(HSQOBJECT *ptr) { sq_release(this->vm, ptr); } + + /** + * Tell the VM to remove \c amount ops from the number of ops till suspend. + */ + static void DecreaseOps(HSQUIRRELVM vm, int amount); }; #endif /* SQUIRREL_HPP */ |