From cd4cfba5000d141e97a9ac6ef0e3204e6cb8f905 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 26 Apr 2021 21:07:35 +0200 Subject: [PATCH 1/3] Delete faulty return --- src/d_clisrv.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 7c2dec6a1..c4026d52d 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1568,11 +1568,6 @@ static void CL_LoadReceivedSavegame(boolean reloading) else { CONS_Alert(CONS_ERROR, M_GetText("Can't load the level!\n")); - Z_Free(savebuffer); - save_p = NULL; - if (unlink(tmpsave) == -1) - CONS_Alert(CONS_ERROR, M_GetText("Can't delete %s\n"), tmpsave); - return; } // done @@ -4486,9 +4481,9 @@ static INT16 Consistancy(void) { if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed) continue; - + mo = (mobj_t *)th; - + if (mo->flags & (MF_SPECIAL | MF_SOLID | MF_PUSHABLE | MF_BOSS | MF_MISSILE | MF_SPRING | MF_MONITOR | MF_FIRE | MF_ENEMY | MF_PAIN | MF_STICKY)) { ret -= mo->type; From 0d4d3a520777bf81609df4c28b144330ab66b640 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 26 Apr 2021 21:07:35 +0200 Subject: [PATCH 2/3] Revert "Lua: ensure order of MIN, MAX possible values" This reverts commit c51c478740d1bb22dbe0a28923c433038ec76cfc. --- src/lua_consolelib.c | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/src/lua_consolelib.c b/src/lua_consolelib.c index e839d4e15..5344fee76 100644 --- a/src/lua_consolelib.c +++ b/src/lua_consolelib.c @@ -361,9 +361,6 @@ static int lib_cvRegisterVar(lua_State *L) size_t count = 0; CV_PossibleValue_t *cvpv; - const char * const MINMAX[2] = {"MIN", "MAX"}; - int minmax_unset = 3; - lua_pushnil(L); while (lua_next(L, 4)) { count++; @@ -380,45 +377,16 @@ static int lib_cvRegisterVar(lua_State *L) i = 0; lua_pushnil(L); while (lua_next(L, 4)) { - INT32 n; - const char * strval; - // stack: [...] PossibleValue table, index, value // 4 5 6 if (lua_type(L, 5) != LUA_TSTRING || lua_type(L, 6) != LUA_TNUMBER) FIELDERROR("PossibleValue", "custom PossibleValue table requires a format of string=integer, i.e. {MIN=0, MAX=9999}"); - - strval = lua_tostring(L, 5); - - if ( - stricmp(strval, MINMAX[n=0]) == 0 || - stricmp(strval, MINMAX[n=1]) == 0 - ){ - /* need to shift forward */ - if (minmax_unset == 3) - { - memmove(&cvpv[2], &cvpv[0], - i * sizeof *cvpv); - } - cvpv[n].strvalue = MINMAX[n]; - minmax_unset &= ~(1 << n); - } - else - { - n = i; - cvpv[n].strvalue = Z_StrDup(strval); - } - - cvpv[n].value = (INT32)lua_tonumber(L, 6); - + cvpv[i].strvalue = Z_StrDup(lua_tostring(L, 5)); + cvpv[i].value = (INT32)lua_tonumber(L, 6); i++; lua_pop(L, 1); } - - if (minmax_unset) - FIELDERROR("PossibleValue", "custom PossibleValue table requires requires both MIN and MAX keys if one is present"); - cvpv[i].value = 0; cvpv[i].strvalue = NULL; cvar->PossibleValue = cvpv; From 34911128187161136db79cbb9df302cb8c8fccc1 Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Mon, 26 Apr 2021 21:07:35 +0200 Subject: [PATCH 3/3] Update copyright date --- src/d_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_main.c b/src/d_main.c index 23a2c0133..61510d590 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1045,7 +1045,7 @@ void D_SRB2Main(void) // Print GPL notice for our console users (Linux) CONS_Printf( "\n\nSonic Robo Blast 2\n" - "Copyright (C) 1998-2020 by Sonic Team Junior\n\n" + "Copyright (C) 1998-2021 by Sonic Team Junior\n\n" "This program comes with ABSOLUTELY NO WARRANTY.\n\n" "This is free software, and you are welcome to redistribute it\n" "and/or modify it under the terms of the GNU General Public License\n"