residualvm/residualvm — pull request #784 by inguin (2013-12-08 20:03:43+00:00)
Title: GRIM/EMI: Count pause/unpause calls of LUA scripts

Scripts that have explicitly been paused must not be resumed when
pause_scripts/unpause_scripts are called, e.g. when opening the
inventory, pausing the game or changing sets.

Pause calls are now counted, i.e. when a script is paused twice it must
be unpaused twice before resuming. This fixes the flaming sushi boat
puzzle which involves changing sets while a script is paused.

The change does not affect Grim where scripts are always paused/resumed all at once and symmetrically.