Lunatic: initialize SPRITE_HARDCODED_BADGUY on Lua state recreation, too.

git-svn-id: https://svn.eduke32.com/eduke32@3795 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-05-20 19:31:37 +00:00
parent 76299ca635
commit f6ea669613
3 changed files with 10 additions and 1 deletions

View file

@ -9885,6 +9885,13 @@ void El_CreateGameState(void)
}
#endif
// Throw in everything here that needs to be called after a Lua game state
// recreation (or on initial startup in a non-Lunatic build.)
void G_PostCreateGameState(void)
{
A_InitEnemyFlags();
}
static void G_Startup(void)
{
int32_t i;
@ -9912,7 +9919,7 @@ static void G_Startup(void)
#endif
G_InitDynamicTiles();
A_InitEnemyFlags();
G_PostCreateGameState();
if (g_netServer || ud.multimode > 1) G_CheckGametype();

View file

@ -299,6 +299,7 @@ void Yax_SetBunchZs(int32_t sectnum, int32_t cf, int32_t daz);
#ifdef LUNATIC
void El_CreateGameState(void);
#endif
void G_PostCreateGameState(void);
void A_SpawnCeilingGlass(int32_t i,int32_t sectnum,int32_t n);
void A_SpawnGlass(int32_t i,int32_t n);

View file

@ -1119,6 +1119,7 @@ static inline void prelevel(char g)
#ifdef LUNATIC
El_CreateGameState();
G_PostCreateGameState();
#endif
i = headspritestat[STAT_DEFAULT];