Clean up what happens at the end of a combat script.

This commit is contained in:
Martin Haye 2016-06-30 08:47:30 -07:00
parent f1fbd7bd8c
commit 02bbbf5ac7
2 changed files with 3 additions and 2 deletions

View File

@ -2850,7 +2850,7 @@ end
def facing = blk.field[3].text().toInteger() def facing = blk.field[3].text().toInteger()
assert facing >= 0 && facing <= 15 assert facing >= 0 && facing <= 15
outIndented("queue_setMap(${mapNum[0] == '2D' ? 0 : 1}, ${mapNum[1]}, $x, $y, $facing)\n") outIndented("return queue_setMap(${mapNum[0] == '2D' ? 0 : 1}, ${mapNum[1]}, $x, $y, $facing)\n")
} }
def packSetPortrait(blk) def packSetPortrait(blk)
@ -2905,7 +2905,7 @@ end
{ {
assert blk.field.size() == 1 assert blk.field.size() == 1
def code = getSingle(blk.field, 'CODE') def code = getSingle(blk.field, 'CODE')
outIndented("scriptCombat(${escapeString(code)}); return\n") outIndented("scriptCombat(${escapeString(code)})\n")
} }
def packTeleport(blk) def packTeleport(blk)

View File

@ -1290,6 +1290,7 @@ def checkScripts(x, y)
setWindow2() setWindow2()
skipScripts = FALSE skipScripts = FALSE
script() script()
clearPortrait()
// Some scripts need to suppress running of any further scripts on the square // Some scripts need to suppress running of any further scripts on the square
// because they swapped out the render engine. // because they swapped out the render engine.
if skipScripts; return TRUE; fin if skipScripts; return TRUE; fin