mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge Kart-Public next
This commit is contained in:
commit
d63b428565
5 changed files with 17 additions and 4 deletions
|
|
@ -70,6 +70,7 @@ enum hook {
|
|||
extern const char *const hookNames[];
|
||||
|
||||
extern boolean hook_cmd_running;
|
||||
extern int hook_defrosting;
|
||||
|
||||
void LUAh_MapChange(INT16 mapnumber); // Hook for map change (before load)
|
||||
void LUAh_MapLoad(void); // Hook for map load
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
|
||||
lua_State *gL = NULL;
|
||||
|
||||
int hook_defrosting;
|
||||
|
||||
// List of internal libraries to load from SRB2
|
||||
static lua_CFunction liblist[] = {
|
||||
LUA_EnumLib, // global metatable for enums
|
||||
|
|
@ -282,6 +284,9 @@ int LUA_PushGlobals(lua_State *L, const char *word)
|
|||
} else if (fastcmp(word,"leveltime")) {
|
||||
lua_pushinteger(L, leveltime);
|
||||
return 1;
|
||||
} else if (fastcmp(word,"defrosting")) {
|
||||
lua_pushinteger(L, hook_defrosting);
|
||||
return 1;
|
||||
} else if (fastcmp(word,"curWeather")) {
|
||||
lua_pushinteger(L, curWeather);
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -718,7 +718,7 @@ void P_Ticker(boolean run)
|
|||
// Abbreviated ticker for pre-loading, calls thinkers and assorted things
|
||||
void P_PreTicker(INT32 frames)
|
||||
{
|
||||
INT32 i,framecnt;
|
||||
INT32 i;
|
||||
ticcmd_t temptic;
|
||||
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
|
|
@ -727,7 +727,9 @@ void P_PreTicker(INT32 frames)
|
|||
if (marathonmode & MA_INGAME)
|
||||
marathonmode |= MA_INIT;
|
||||
|
||||
for (framecnt = 0; framecnt < frames; ++framecnt)
|
||||
hook_defrosting = frames;
|
||||
|
||||
while (hook_defrosting)
|
||||
{
|
||||
P_MapStart();
|
||||
|
||||
|
|
@ -777,6 +779,8 @@ void P_PreTicker(INT32 frames)
|
|||
LUAh_PostThinkFrame();
|
||||
|
||||
P_MapEnd();
|
||||
|
||||
hook_defrosting--;
|
||||
}
|
||||
|
||||
if (marathonmode & MA_INGAME)
|
||||
|
|
|
|||
|
|
@ -650,7 +650,6 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
|
|||
// Tell game we got focus back, resume music if necessary
|
||||
window_notinfocus = false;
|
||||
|
||||
if (!paused)
|
||||
S_InitMusicVolume();
|
||||
|
||||
if (cv_gamesounds.value)
|
||||
|
|
|
|||
|
|
@ -184,3 +184,7 @@ else
|
|||
endif
|
||||
LIBS+=-ldiscord-rpc
|
||||
endif
|
||||
|
||||
ifndef MINGW64
|
||||
LDFLAGS+=-Wl,--large-address-aware
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue