Merge Kart-Public next

This commit is contained in:
Sally Coolatta 2021-02-27 02:16:21 -05:00
commit d63b428565
5 changed files with 17 additions and 4 deletions

View file

@ -70,6 +70,7 @@ enum hook {
extern const char *const hookNames[]; extern const char *const hookNames[];
extern boolean hook_cmd_running; extern boolean hook_cmd_running;
extern int hook_defrosting;
void LUAh_MapChange(INT16 mapnumber); // Hook for map change (before load) void LUAh_MapChange(INT16 mapnumber); // Hook for map change (before load)
void LUAh_MapLoad(void); // Hook for map load void LUAh_MapLoad(void); // Hook for map load

View file

@ -37,6 +37,8 @@
lua_State *gL = NULL; lua_State *gL = NULL;
int hook_defrosting;
// List of internal libraries to load from SRB2 // List of internal libraries to load from SRB2
static lua_CFunction liblist[] = { static lua_CFunction liblist[] = {
LUA_EnumLib, // global metatable for enums LUA_EnumLib, // global metatable for enums
@ -282,6 +284,9 @@ int LUA_PushGlobals(lua_State *L, const char *word)
} else if (fastcmp(word,"leveltime")) { } else if (fastcmp(word,"leveltime")) {
lua_pushinteger(L, leveltime); lua_pushinteger(L, leveltime);
return 1; return 1;
} else if (fastcmp(word,"defrosting")) {
lua_pushinteger(L, hook_defrosting);
return 1;
} else if (fastcmp(word,"curWeather")) { } else if (fastcmp(word,"curWeather")) {
lua_pushinteger(L, curWeather); lua_pushinteger(L, curWeather);
return 1; return 1;

View file

@ -718,7 +718,7 @@ void P_Ticker(boolean run)
// Abbreviated ticker for pre-loading, calls thinkers and assorted things // Abbreviated ticker for pre-loading, calls thinkers and assorted things
void P_PreTicker(INT32 frames) void P_PreTicker(INT32 frames)
{ {
INT32 i,framecnt; INT32 i;
ticcmd_t temptic; ticcmd_t temptic;
for (i = 0; i <= r_splitscreen; i++) for (i = 0; i <= r_splitscreen; i++)
@ -727,7 +727,9 @@ void P_PreTicker(INT32 frames)
if (marathonmode & MA_INGAME) if (marathonmode & MA_INGAME)
marathonmode |= MA_INIT; marathonmode |= MA_INIT;
for (framecnt = 0; framecnt < frames; ++framecnt) hook_defrosting = frames;
while (hook_defrosting)
{ {
P_MapStart(); P_MapStart();
@ -777,6 +779,8 @@ void P_PreTicker(INT32 frames)
LUAh_PostThinkFrame(); LUAh_PostThinkFrame();
P_MapEnd(); P_MapEnd();
hook_defrosting--;
} }
if (marathonmode & MA_INGAME) if (marathonmode & MA_INGAME)

View file

@ -650,7 +650,6 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
// Tell game we got focus back, resume music if necessary // Tell game we got focus back, resume music if necessary
window_notinfocus = false; window_notinfocus = false;
if (!paused)
S_InitMusicVolume(); S_InitMusicVolume();
if (cv_gamesounds.value) if (cv_gamesounds.value)

View file

@ -184,3 +184,7 @@ else
endif endif
LIBS+=-ldiscord-rpc LIBS+=-ldiscord-rpc
endif endif
ifndef MINGW64
LDFLAGS+=-Wl,--large-address-aware
endif