From 70d84cd75baba51cd1b416dee5516ea67d1a8a5f Mon Sep 17 00:00:00 2001 From: helixhorned Date: Tue, 31 Dec 2013 11:51:50 +0000 Subject: [PATCH] Lunatic: run EVENT_INIT after initial Lua state creation. git-svn-id: https://svn.eduke32.com/eduke32@4231 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 4 +++- polymer/eduke32/source/lunatic/con_lang.lua | 1 - polymer/eduke32/source/lunatic/doc/lunacon.txt | 5 ----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 4c23b0187..cf081172b 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10744,7 +10744,9 @@ static void G_Startup(void) G_InitMultiPsky(CLOUDYOCEAN, MOONSKY1, BIGORBIT1, LA); Gv_FinalizeWeaponDefaults(); G_PostCreateGameState(); - +#ifdef LUNATIC + VM_OnEvent(EVENT_INIT, -1, -1, -1, 0); +#endif if (g_netServer || ud.multimode > 1) G_CheckGametype(); if (g_noSound) ud.config.SoundToggle = 0; diff --git a/polymer/eduke32/source/lunatic/con_lang.lua b/polymer/eduke32/source/lunatic/con_lang.lua index 40114da9a..b26930ee4 100644 --- a/polymer/eduke32/source/lunatic/con_lang.lua +++ b/polymer/eduke32/source/lunatic/con_lang.lua @@ -73,7 +73,6 @@ PROJ = { PROJ_USERDATA = 29, } --- TODO: EVENT_INIT currently can't run since we init Lunatic state only afterwards EVENT = { EVENT_INIT = 0, EVENT_ENTERLEVEL = 1, diff --git a/polymer/eduke32/source/lunatic/doc/lunacon.txt b/polymer/eduke32/source/lunatic/doc/lunacon.txt index 36eb2a7f3..c4dc4d9e9 100644 --- a/polymer/eduke32/source/lunatic/doc/lunacon.txt +++ b/polymer/eduke32/source/lunatic/doc/lunacon.txt @@ -326,8 +326,3 @@ Additionally, various multiplayer-related commands either unconditionally return results as if no multiplayer game is in progress, or are non-functional for more than the first player. Also, some MP-related variables are merely predefined constants. - -Miscellaneous -^^^^^^^^^^^^^ - -* not LunaCON-specific: `EVENT_INIT` is never reached as it runs before Lua state creation