mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 00:41:12 +00:00
XEEN: Fix Swords scripts using cmdReturn instead of cmdExit
This commit is contained in:
parent
77c06fe487
commit
c92561cd61
@ -1048,11 +1048,16 @@ bool Scripts::cmdCallEvent(ParamsIterator ¶ms) {
|
||||
}
|
||||
|
||||
bool Scripts::cmdReturn(ParamsIterator ¶ms) {
|
||||
StackEntry se = _stack.pop();
|
||||
_currentPos = se;
|
||||
_lineNum = se.line;
|
||||
if (_stack.empty()) {
|
||||
// WORKAROUND: Some scripts in Swords of Xeen use cmdReturn as a substitute for cmdExit
|
||||
return cmdExit(params);
|
||||
} else {
|
||||
StackEntry se = _stack.pop();
|
||||
_currentPos = se;
|
||||
_lineNum = se.line;
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool Scripts::cmdSetVar(ParamsIterator ¶ms) {
|
||||
|
Loading…
Reference in New Issue
Block a user