mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-03 06:51:11 +00:00
Fix AddonLoaded hook
This commit is contained in:
parent
d3f454e18a
commit
14199102b7
2 changed files with 12 additions and 4 deletions
|
@ -530,7 +530,7 @@ UINT32 P_GetScoreForGradeOverall(INT16 map, UINT8 grade)
|
|||
void P_AddNiGHTSTimes(INT16 i, char *gtext)
|
||||
{
|
||||
char *spos = gtext;
|
||||
|
||||
|
||||
for (UINT8 n = 0; n < 8; n++)
|
||||
{
|
||||
if (spos != NULL)
|
||||
|
@ -3075,7 +3075,7 @@ static void P_LoadTextmap(void)
|
|||
// TODO: remove this limitation in a backwards-compatible way (UDMF versioning?)
|
||||
UINT8 lightalpha = (textmap_colormap.lightalpha * 102) / 10;
|
||||
UINT8 fadealpha = (textmap_colormap.fadealpha * 102) / 10;
|
||||
|
||||
|
||||
INT32 rgba = P_ColorToRGBA(textmap_colormap.lightcolor, lightalpha);
|
||||
INT32 fadergba = P_ColorToRGBA(textmap_colormap.fadecolor, fadealpha);
|
||||
sc->extra_colormap = sc->spawn_extra_colormap = R_CreateColormap(rgba, fadergba, textmap_colormap.fadestart, textmap_colormap.fadeend, textmap_colormap.flags);
|
||||
|
@ -8464,8 +8464,6 @@ static boolean P_LoadAddon(UINT16 numlumps)
|
|||
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
|
||||
}
|
||||
|
||||
LUA_HookVoid(HOOK(AddonLoaded));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
10
src/w_wad.c
10
src/w_wad.c
|
@ -65,6 +65,7 @@
|
|||
#include "i_video.h" // rendermode
|
||||
#include "md5.h"
|
||||
#include "lua_script.h"
|
||||
#include "lua_hook.h"
|
||||
#ifdef SCANTHINGS
|
||||
#include "p_setup.h" // P_ScanThings
|
||||
#endif
|
||||
|
@ -1009,6 +1010,10 @@ UINT16 W_InitFile(const char *filename, boolean mainfile, boolean startup)
|
|||
break;
|
||||
}
|
||||
|
||||
lua_lumploading++;
|
||||
LUA_HookVoid(HOOK(AddonLoaded));
|
||||
lua_lumploading--;
|
||||
|
||||
W_InvalidateLumpnumCache();
|
||||
return wadfile->numlumps;
|
||||
}
|
||||
|
@ -1169,6 +1174,11 @@ UINT16 W_InitFolder(const char *path, boolean mainfile, boolean startup)
|
|||
W_ReadFileShaders(wadfile);
|
||||
W_LoadTrnslateLumps(numwadfiles - 1);
|
||||
W_LoadDehackedLumpsPK3(numwadfiles - 1, mainfile);
|
||||
|
||||
lua_lumploading++;
|
||||
LUA_HookVoid(HOOK(AddonLoaded));
|
||||
lua_lumploading--;
|
||||
|
||||
W_InvalidateLumpnumCache();
|
||||
|
||||
return wadfile->numlumps;
|
||||
|
|
Loading…
Reference in a new issue