diff options
Diffstat (limited to 'engines/director/lingo/lingo-code.cpp')
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index 3dead580da..ca04dce550 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -940,8 +940,13 @@ void Lingo::c_whencode() { debugC(3, kDebugLingoExec, "c_whencode([%5d][%5d], %s)", start, end, eventname.c_str()); + int entity = g_lingo->_currentEntityId; + g_lingo->_currentEntityId = 0; + g_lingo->define(eventname, start, 0, NULL, end); + g_lingo->_currentEntityId = entity; + if (debugChannelSet(3, kDebugLingoExec)) { uint pc = start; while (pc <= end) { |