X,Y can sometimes be nil to startMovie, so accept that to prevent the script dying when entering the garage.
This commit is contained in:
parent
5ec54ab780
commit
3cb5753213
1 changed files with 9 additions and 2 deletions
11
lua.cpp
11
lua.cpp
|
@ -1091,8 +1091,15 @@ static void StartFullscreenMovie() {
|
|||
|
||||
static void StartMovie() {
|
||||
bool mode = getbool(2);
|
||||
int x = check_int(3);
|
||||
int y = check_int(4);
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
if (!lua_isnil(lua_getparam(4)))
|
||||
x = check_int(4);
|
||||
|
||||
if (!lua_isnil(lua_getparam(3)))
|
||||
y = check_int(3);
|
||||
|
||||
Engine::instance()->setMode(ENGINE_MODE_NORMAL);
|
||||
pushbool(g_smush->play(luaL_check_string(1), x, y));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue