diff options
author | Tobias Gunkel | 2012-01-22 23:20:27 +0100 |
---|---|---|
committer | Tobias Gunkel | 2012-02-11 08:29:21 +0100 |
commit | e3f9a09d49aaeb4657862ca734d20279e75c869f (patch) | |
tree | 25f8ac0f69079638444fedc48417b62e430ed655 /engines/scumm/scumm_v0.h | |
parent | fb684565412c69aeb0d0a9837fc5a76b98cbe285 (diff) | |
download | scummvm-rg350-e3f9a09d49aaeb4657862ca734d20279e75c869f.tar.gz scummvm-rg350-e3f9a09d49aaeb4657862ca734d20279e75c869f.tar.bz2 scummvm-rg350-e3f9a09d49aaeb4657862ca734d20279e75c869f.zip |
SCUMM: keep track of the number of nested script calls for a sentence
command in v0
If for instance an object necessary for the sentence command is not reachable or pickupable (try to use faucet (object 55) with jar with water in microwave (object 50), the pick-up script of the jar will tell the actor to pickup object 99 (jar not in microwave)) the actor will try to pick-up the jar infinitely.
This is fixed by counting the amount of nested scripts the sentence command has called (directly or indirectly) so far and aborts it if there have been too many.
Diffstat (limited to 'engines/scumm/scumm_v0.h')
-rw-r--r-- | engines/scumm/scumm_v0.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/scumm/scumm_v0.h b/engines/scumm/scumm_v0.h index e25d6f5826..8b13569042 100644 --- a/engines/scumm/scumm_v0.h +++ b/engines/scumm/scumm_v0.h @@ -55,6 +55,7 @@ protected: int _cmdVerb; // script verb int _cmdObject; // 1st script object (see OBJECT_V0()) int _cmdObject2; // 2nd script object or actor (see OBJECT_V0()) + int _sentenceNestedCount; int _walkToObject; int _walkToObjectState; |