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.
This commit is contained in:
parent
fb68456541
commit
e3f9a09d49
4 changed files with 21 additions and 3 deletions
|
@ -979,6 +979,9 @@ void ScummEngine_v0::resetSentence() {
|
|||
|
||||
_walkToObjectState = kWalkToObjectStateDone;
|
||||
_redrawSentenceLine = true;
|
||||
|
||||
_sentenceNum = 0;
|
||||
_sentenceNestedCount = 0;
|
||||
}
|
||||
|
||||
} // End of namespace Scumm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue