aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/verbs.cpp
diff options
context:
space:
mode:
authorTobias Gunkel2012-01-22 23:20:27 +0100
committerTobias Gunkel2012-02-11 08:29:21 +0100
commite3f9a09d49aaeb4657862ca734d20279e75c869f (patch)
tree25f8ac0f69079638444fedc48417b62e430ed655 /engines/scumm/verbs.cpp
parentfb684565412c69aeb0d0a9837fc5a76b98cbe285 (diff)
downloadscummvm-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/verbs.cpp')
-rw-r--r--engines/scumm/verbs.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 91c9cc159a..7a099adae9 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -689,6 +689,9 @@ int ScummEngine_v0::activeVerbPrep() {
}
void ScummEngine_v0::verbExec() {
+ _sentenceNum = 0;
+ _sentenceNestedCount = 0;
+
if (_activeVerb == kVerbWhatIs)
return;