ignore [delay] during preload,prestart and initial lua.
as the ingame ui is not shown yet, [delay] would only result in showing a black screen, Also in the case of initial lua it might result in crashes because of the threaded loadingscren, or simply because parts of the ui are not initialized yet.
This commit is contained in:
parent
12a3b973b9
commit
97b5612691
1 changed files with 4 additions and 0 deletions
|
@ -3296,6 +3296,10 @@ int game_lua_kernel::intf_color_adjust(lua_State *L)
|
|||
*/
|
||||
int game_lua_kernel::intf_delay(lua_State *L)
|
||||
{
|
||||
if(gamedata().phase() == game_data::PRELOAD || gamedata().phase() == game_data::PRESTART || gamedata().phase() == game_data::INITIAL) {
|
||||
//don't call play_slice if the game ui is not active yet.
|
||||
return 0;
|
||||
}
|
||||
events::command_disabler command_disabler;
|
||||
lua_Integer delay = luaL_checkinteger(L, 1);
|
||||
if(delay == 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue