From 0b11424e3d5bdf2b422fa96e5641bf1c3636a543 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Sun, 3 Mar 2019 19:58:01 -0500 Subject: [PATCH 01/51] Error if the lump is a PNG lump --- src/w_wad.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/w_wad.c b/src/w_wad.c index 88e89974a..9ca4e0ff0 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -1175,6 +1175,29 @@ void zerr(int ret) } #endif +#define NO_PNG_LUMPS + +#ifdef NO_PNG_LUMPS +static void ErrorIfPNG(void *d, size_t s, char *f, char *l) +{ + if (s < 67) // http://garethrees.org/2007/11/14/pngcrush/ + return; +#define sigcheck ((UINT8 *)d) + if (sigcheck[0] == 0x89 + && sigcheck[1] == 0x50 + && sigcheck[2] == 0x4e + && sigcheck[3] == 0x47 + && sigcheck[4] == 0x0d + && sigcheck[5] == 0x0a + && sigcheck[6] == 0x1a + && sigcheck[7] == 0x0a) + { + I_Error("W_Wad: Lump \"%s\" in file \"%s\" is a .PNG - please convert to either Doom or Flat (raw) image format.", l, f); + } +#undef sigcheck +} +#endif + /** Reads bytes from the head of a lump. * Note: If the lump is compressed, the whole thing has to be read anyway. * @@ -1214,7 +1237,15 @@ size_t W_ReadLumpHeaderPwad(UINT16 wad, UINT16 lump, void *dest, size_t size, si switch(wadfiles[wad]->lumpinfo[lump].compression) { case CM_NOCOMPRESSION: // If it's uncompressed, we directly write the data into our destination, and return the bytes read. +#ifdef NO_PNG_LUMPS + { + size_t bytesread = fread(dest, 1, size, handle); + ErrorIfPNG(dest, bytesread, wadfiles[wad]->filename, l->name2); + return bytesread; + } +#else return fread(dest, 1, size, handle); +#endif case CM_LZF: // Is it LZF compressed? Used by ZWADs. { #ifdef ZWAD @@ -1249,11 +1280,15 @@ size_t W_ReadLumpHeaderPwad(UINT16 wad, UINT16 lump, void *dest, size_t size, si M_Memcpy(dest, decData + offset, size); Z_Free(rawData); Z_Free(decData); +#ifdef NO_PNG_LUMPS + ErrorIfPNG(dest, size, wadfiles[wad]->filename, l->name2); +#endif return size; #else //I_Error("ZWAD files not supported on this platform."); return 0; #endif + } #ifdef HAVE_ZLIB case CM_DEFLATE: // Is it compressed via DEFLATE? Very common in ZIPs/PK3s, also what most doom-related editors support. @@ -1307,6 +1342,9 @@ size_t W_ReadLumpHeaderPwad(UINT16 wad, UINT16 lump, void *dest, size_t size, si Z_Free(rawData); Z_Free(decData); +#ifdef NO_PNG_LUMPS + ErrorIfPNG(dest, size, wadfiles[wad]->filename, l->name2); +#endif return size; } #endif From c6900b6c897d78386a6f229dee854be6067dc440 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Sun, 3 Mar 2019 22:43:21 -0500 Subject: [PATCH 02/51] Check using memcmp() --- src/w_wad.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/w_wad.c b/src/w_wad.c index 9ca4e0ff0..b5aa95fac 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -1183,14 +1183,10 @@ static void ErrorIfPNG(void *d, size_t s, char *f, char *l) if (s < 67) // http://garethrees.org/2007/11/14/pngcrush/ return; #define sigcheck ((UINT8 *)d) - if (sigcheck[0] == 0x89 - && sigcheck[1] == 0x50 - && sigcheck[2] == 0x4e - && sigcheck[3] == 0x47 - && sigcheck[4] == 0x0d - && sigcheck[5] == 0x0a - && sigcheck[6] == 0x1a - && sigcheck[7] == 0x0a) + // Check for PNG file signature using memcmp + // As it may be faster on CPUs with slow unaligned memory access + // Ref: http://www.libpng.org/pub/png/spec/1.2/PNG-Rationale.html#R.PNG-file-signature + if (memcmp(&sigcheck[0], "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a", 8) == 0) { I_Error("W_Wad: Lump \"%s\" in file \"%s\" is a .PNG - please convert to either Doom or Flat (raw) image format.", l, f); } From 3c1f0b5e3f296fb31aee8a2a2009eb05d6d0631a Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Sun, 3 Mar 2019 22:57:09 -0500 Subject: [PATCH 03/51] New -noxinput and -nohidapi command line parameters. --- src/sdl/i_system.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index b5597784e..517c183ee 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -1402,7 +1402,13 @@ static int joy_open2(const char *fname) void I_InitJoystick(void) { I_ShutdownJoystick(); - SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE); + + if (M_CheckParm("-noxinput")) + SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE); + + if (M_CheckParm("-nohidapi")) + SDL_SetHintWithPriority("SDL_JOYSTICK_HIDAPI", "0", SDL_HINT_OVERRIDE); + if (!strcmp(cv_usejoystick.string, "0") || M_CheckParm("-nojoy")) return; if (joy_open(cv_usejoystick.string) != -1) @@ -1418,7 +1424,13 @@ void I_InitJoystick(void) void I_InitJoystick2(void) { I_ShutdownJoystick2(); - SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE); + + if (M_CheckParm("-noxinput")) + SDL_SetHintWithPriority("SDL_XINPUT_ENABLED", "0", SDL_HINT_OVERRIDE); + + if (M_CheckParm("-nohidapi")) + SDL_SetHintWithPriority("SDL_JOYSTICK_HIDAPI", "0", SDL_HINT_OVERRIDE); + if (!strcmp(cv_usejoystick2.string, "0") || M_CheckParm("-nojoy")) return; if (joy_open2(cv_usejoystick2.string) != -1) From 5b369ad21ec4d04cd622ef9987eeb24522c73684 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Tue, 5 Mar 2019 19:04:15 -0500 Subject: [PATCH 04/51] Allow names to be used with forceskin --- src/d_netcmd.c | 25 +++++++------------------ src/r_things.c | 10 ++++++++++ src/r_things.h | 2 ++ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index a8efd3066..d8412d3c7 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -422,7 +422,7 @@ consvar_t cv_numlaps = {"numlaps", "3", CV_NETVAR|CV_CALL|CV_NOINIT, numlaps_con static CV_PossibleValue_t basenumlaps_cons_t[] = {{1, "MIN"}, {50, "MAX"}, {0, "Map default"}, {0, NULL}}; consvar_t cv_basenumlaps = {"basenumlaps", "Map default", CV_NETVAR|CV_CALL|CV_CHEAT, basenumlaps_cons_t, BaseNumLaps_OnChange, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cv_forceskin = {"forceskin", "-1", CV_NETVAR|CV_CALL|CV_CHEAT, NULL, ForceSkin_OnChange, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_forceskin = {"forceskin", "Off", CV_NETVAR|CV_CALL|CV_CHEAT, Forceskin_cons_t, ForceSkin_OnChange, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_downloading = {"downloading", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_allowexitlevel = {"allowexitlevel", "No", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -513,6 +513,11 @@ const char *netxcmdnames[MAXNETXCMD - 1] = */ void D_RegisterServerCommands(void) { + Forceskin_cons_t[0].value = -1; + Forceskin_cons_t[0].strvalue = "Off"; + Forceskin_cons_t[MAXSKINS].value = 0; + Forceskin_cons_t[MAXSKINS].strvalue = NULL; + RegisterNetXCmd(XD_NAMEANDCOLOR, Got_NameAndColor); RegisterNetXCmd(XD_WEAPONPREF, Got_WeaponPref); RegisterNetXCmd(XD_MAP, Got_Mapcmd); @@ -5021,27 +5026,11 @@ static void Command_Archivetest_f(void) /** Makes a change to ::cv_forceskin take effect immediately. * - * \todo Move the enforcement code out of SendNameAndColor() so this hack - * isn't needed. * \sa Command_SetForcedSkin_f, cv_forceskin, forcedskin * \author Graue */ static void ForceSkin_OnChange(void) { - if ((server || IsPlayerAdmin(consoleplayer)) && (cv_forceskin.value < -1 || cv_forceskin.value >= numskins)) - { - if (cv_forceskin.value == -2) - CV_SetValue(&cv_forceskin, numskins-1); - else - { - // hack because I can't restrict this and still allow added skins to be used with forceskin. - if (!menuactive) - CONS_Printf(M_GetText("Valid skin numbers are 0 to %d (-1 disables)\n"), numskins - 1); - CV_SetValue(&cv_forceskin, -1); - } - return; - } - // NOT in SP, silly! if (!(netgame || multiplayer)) return; @@ -5050,7 +5039,7 @@ static void ForceSkin_OnChange(void) CONS_Printf("The server has lifted the forced skin restrictions.\n"); else { - CONS_Printf("The server is restricting all players to skin \"%s\".\n",skins[cv_forceskin.value].name); + CONS_Printf("The server is restricting all players to skin \"%s\".\n",cv_forceskin.string); ForceAllSkins(cv_forceskin.value); } } diff --git a/src/r_things.c b/src/r_things.c index 59a904cbd..4b3eee871 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -40,6 +40,8 @@ int snprintf(char *str, size_t n, const char *fmt, ...); //int vsnprintf(char *str, size_t n, const char *fmt, va_list ap); #endif +CV_PossibleValue_t Forceskin_cons_t[MAXSKINS+1]; + static void R_InitSkins(void); #define MINZ (FRACUNIT*4) @@ -2614,6 +2616,10 @@ void R_InitSkins(void) skin->spritedef.spriteframes = sprites[SPR_PLAY].spriteframes; ST_LoadFaceGraphics(skin->facerank, skin->facewant, skin->facemmap, 0); + // Set values for Sonic skin + Forceskin_cons_t[1].value = 0; + Forceskin_cons_t[1].strvalue = skin->name; + //MD2 for sonic doesn't want to load in Linux. #ifdef HWRENDER if (rendermode == render_opengl) @@ -3038,6 +3044,10 @@ next_token: skin_cons_t[numskins].strvalue = skin->name; #endif + // Update the forceskin possiblevalues + Forceskin_cons_t[numskins+1].value = numskins; + Forceskin_cons_t[numskins+1].strvalue = skins[numskins].name; + // add face graphics ST_LoadFaceGraphics(skin->facerank, skin->facewant, skin->facemmap, numskins); diff --git a/src/r_things.h b/src/r_things.h index 01d8fc071..0a92b3c23 100644 --- a/src/r_things.h +++ b/src/r_things.h @@ -115,6 +115,8 @@ typedef struct sfxenum_t soundsid[NUMSKINSOUNDS]; // sound # in S_sfx table } skin_t; +extern CV_PossibleValue_t Forceskin_cons_t[]; + // ----------- // NOT SKINS STUFF ! // ----------- From df8a5ffc1e65f5eef48199dbbb4fa1ae5ff4ab3e Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Mon, 11 Mar 2019 22:11:36 -0400 Subject: [PATCH 05/51] Change array size from MAXSKINS+1 to MAXSKINS+2 Also Set the values to 0/NULl, it will be overwritten later when a skin is assigned to the slot. --- src/d_netcmd.c | 10 ++++++++-- src/r_things.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 26743b739..98e9c6e5a 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -514,10 +514,16 @@ const char *netxcmdnames[MAXNETXCMD - 1] = */ void D_RegisterServerCommands(void) { + int i; Forceskin_cons_t[0].value = -1; Forceskin_cons_t[0].strvalue = "Off"; - Forceskin_cons_t[MAXSKINS].value = 0; - Forceskin_cons_t[MAXSKINS].strvalue = NULL; + + // Set the values to 0/NULl, it will be overwritten later when a skin is assigned to the slot. + for (i = 1; i < MAXSKINS; i++) + { + Forceskin_cons_t[i].value = 0; + Forceskin_cons_t[i].strvalue = NULL; + } RegisterNetXCmd(XD_NAMEANDCOLOR, Got_NameAndColor); RegisterNetXCmd(XD_WEAPONPREF, Got_WeaponPref); diff --git a/src/r_things.c b/src/r_things.c index f0acaae56..3ea5ebade 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -40,7 +40,7 @@ int snprintf(char *str, size_t n, const char *fmt, ...); //int vsnprintf(char *str, size_t n, const char *fmt, va_list ap); #endif -CV_PossibleValue_t Forceskin_cons_t[MAXSKINS+1]; +CV_PossibleValue_t Forceskin_cons_t[MAXSKINS+2]; static void R_InitSkins(void); From 47570319298c0357ad16edee51128235f7444643 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Fri, 15 Mar 2019 18:46:25 -0400 Subject: [PATCH 06/51] Remove the define. --- src/w_wad.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/w_wad.c b/src/w_wad.c index 4f0142081..c4f9ceca8 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -1182,19 +1182,17 @@ void zerr(int ret) #define NO_PNG_LUMPS #ifdef NO_PNG_LUMPS -static void ErrorIfPNG(void *d, size_t s, char *f, char *l) +static void ErrorIfPNG(UINT8 *d, size_t s, char *f, char *l) { if (s < 67) // http://garethrees.org/2007/11/14/pngcrush/ return; -#define sigcheck ((UINT8 *)d) // Check for PNG file signature using memcmp // As it may be faster on CPUs with slow unaligned memory access // Ref: http://www.libpng.org/pub/png/spec/1.2/PNG-Rationale.html#R.PNG-file-signature - if (memcmp(&sigcheck[0], "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a", 8) == 0) + if (memcmp(&d[0], "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a", 8) == 0) { I_Error("W_Wad: Lump \"%s\" in file \"%s\" is a .PNG - please convert to either Doom or Flat (raw) image format.", l, f); } -#undef sigcheck } #endif From 94e29d1bb42a74d82f940206f07d317e9956c207 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Tue, 19 Mar 2019 09:10:25 -0400 Subject: [PATCH 07/51] CMake: have funny check for empty CMAKE_SIZEOF_VOID_P --- CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 75aa82f32..0a5507b92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,14 +54,19 @@ macro(copy_files_to_build_dir target dlllist_var) endif() endmacro() -# 64-bit check -message(STATUS "CMAKE_SIZEOF_VOID_P=" ${CMAKE_SIZEOF_VOID_P}) +# bitness check +set(SRB2_SYSTEM_BITS 0) if(CMAKE_SIZEOF_VOID_P EQUAL 8) message(STATUS "Target is 64-bit") set(SRB2_SYSTEM_BITS 64) -else() +endif() +if(CMAKE_SIZEOF_VOID_P EQUAL 4) + message(STATUS "Target is 32-bit") set(SRB2_SYSTEM_BITS 32) endif() +if(${SRB2_SYSTEM_BITS} EQUAL 0) + message(STATUS "Target bitness is unknown") +endif() # OS macros if (UNIX) From 25bd4a0876bdd6a0363f925bd43268fa8894de5c Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 20 Mar 2019 19:20:34 -0700 Subject: [PATCH 08/51] Let localhost connections --- src/i_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i_tcp.c b/src/i_tcp.c index f8a65b754..37e355579 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -612,7 +612,7 @@ static boolean SOCK_Get(void) if (c != ERRSOCKET) { // find remote node number - for (j = 0; j <= MAXNETNODES; j++) //include LAN + for (j = 1; j <= MAXNETNODES; j++) //include LAN { if (SOCK_cmpaddr(&fromaddress, &clientaddress[j], 0)) { From 6939dca52ab2a12c994d13ffbc49b943a14b0246 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 20 Mar 2019 20:05:45 -0700 Subject: [PATCH 09/51] Actually allow connecting to "localhost" Because IPv6 doesn't seem to work anyway. --- src/i_tcp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/i_tcp.c b/src/i_tcp.c index 37e355579..11a84ceba 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -1340,8 +1340,12 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port) while (runp != NULL) { // find ip of the server - memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen); - runp = NULL; + if (sendto(mysockets[0], NULL, 0, 0, runp->ai_addr, runp->ai_addrlen) == 0) + { + memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen); + break; + } + runp = runp->ai_next; } I_freeaddrinfo(ai); return newnode; From d22601e97925c97fc4dcdfce6eeede65012f878a Mon Sep 17 00:00:00 2001 From: fickleheart Date: Sun, 24 Mar 2019 17:31:04 -0500 Subject: [PATCH 10/51] Clear P3 and P4 controls too when clearing all controls --- src/g_input.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/g_input.c b/src/g_input.c index cab358303..08a323c78 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -1239,6 +1239,8 @@ void G_ClearAllControlKeys(void) { G_ClearControlKeys(gamecontrol, i); G_ClearControlKeys(gamecontrolbis, i); + G_ClearControlKeys(gamecontrol3, i); + G_ClearControlKeys(gamecontrol4, i); } } From fa3349a11725e6890ed876a78d1cf4b64771a631 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 25 Mar 2019 18:54:47 +0000 Subject: [PATCH 11/51] R_RenderThickSideRange: clamp lights that fail overflow test, rather than skipping them. --- src/r_segs.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/r_segs.c b/src/r_segs.c index 748365264..7495d7889 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -862,16 +862,18 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) leftheight -= viewz; rightheight -= viewz; -#define OVERFLOWTEST(height, scale) \ - overflow_test = (INT64)centeryfrac - (((INT64)height*scale)>>FRACBITS); \ - if (overflow_test < 0) overflow_test = -overflow_test; \ - if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) continue; +#define CLAMPMAX INT32_MAX +#define CLAMPMIN (-INT32_MAX) // This is not INT32_MIN on purpose! INT32_MIN makes the drawers freak out. + // Monster Iestyn (25/03/18): do not skip these lights if they fail overflow test, just clamp them instead so they behave. + overflow_test = (INT64)centeryfrac - (((INT64)leftheight*ds->scale1)>>FRACBITS); + if (overflow_test > (INT64)CLAMPMAX) rlight->height = CLAMPMAX; + else if (overflow_test > (INT64)CLAMPMIN) rlight->height = (fixed_t)overflow_test; + else rlight->height = CLAMPMIN; - OVERFLOWTEST(leftheight, ds->scale1) - OVERFLOWTEST(rightheight, ds->scale2) - - rlight->height = (centeryfrac) - FixedMul(leftheight, ds->scale1); - rlight->heightstep = (centeryfrac) - FixedMul(rightheight, ds->scale2); + overflow_test = (INT64)centeryfrac - (((INT64)rightheight*ds->scale2)>>FRACBITS); + if (overflow_test > (INT64)CLAMPMAX) rlight->heightstep = CLAMPMAX; + else if (overflow_test > (INT64)CLAMPMIN) rlight->heightstep = (fixed_t)overflow_test; + else rlight->heightstep = CLAMPMIN; rlight->heightstep = (rlight->heightstep-rlight->height)/(range); #else if (light->height < *pfloor->bottomheight) @@ -893,12 +895,16 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) leftheight -= viewz; rightheight -= viewz; - OVERFLOWTEST(leftheight, ds->scale1) - OVERFLOWTEST(rightheight, ds->scale2) -#undef OVERFLOWTEST + // Monster Iestyn (25/03/18): do not skip these lights if they fail overflow test, just clamp them instead so they behave. + overflow_test = (INT64)centeryfrac - (((INT64)leftheight*ds->scale1)>>FRACBITS); + if (overflow_test > (INT64)CLAMPMAX) rlight->botheight = CLAMPMAX; + else if (overflow_test > (INT64)CLAMPMIN) rlight->botheight = (fixed_t)overflow_test; + else rlight->botheight = CLAMPMIN; - rlight->botheight = (centeryfrac) - FixedMul(leftheight, ds->scale1); - rlight->botheightstep = (centeryfrac) - FixedMul(rightheight, ds->scale2); + overflow_test = (INT64)centeryfrac - (((INT64)rightheight*ds->scale2)>>FRACBITS); + if (overflow_test > (INT64)CLAMPMAX) rlight->botheightstep = CLAMPMAX; + else if (overflow_test > (INT64)CLAMPMIN) rlight->botheightstep = (fixed_t)overflow_test; + else rlight->botheightstep = CLAMPMIN; rlight->botheightstep = (rlight->botheightstep-rlight->botheight)/(range); #else lheight = *light->caster->bottomheight;// > *pfloor->topheight ? *pfloor->topheight + FRACUNIT : *light->caster->bottomheight; @@ -1071,9 +1077,6 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) } #endif -#define CLAMPMAX INT32_MAX -#define CLAMPMIN (-INT32_MAX) // This is not INT32_MIN on purpose! INT32_MIN makes the drawers freak out. - // draw the columns for (dc_x = x1; dc_x <= x2; dc_x++) { From 853855eb698490c334bf6747a88bead95711f2af Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 25 Mar 2019 15:16:43 -0400 Subject: [PATCH 12/51] Travis-CI: use a new version of xcode and use homebrew add-on to install packages --- .travis.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4bfc58860..07640f837 100644 --- a/.travis.yml +++ b/.travis.yml @@ -222,7 +222,16 @@ matrix: # osx_image: xcode7.2 # #Apple LLVM version 7.0.2 (clang-700.1.81) - os: osx - osx_image: xcode7.3 + #osx_image: xcode7.3 + addons: + homebrew: + packages: + - sdl2 + - sdl2_mixer + - game-music-emu + - p7zip + - cmake + update: false #Apple LLVM version 7.3.0 (clang-703.0.31) allow_failures: - compiler: clang-3.5 @@ -258,9 +267,6 @@ before_script: - cmake .. -DCMAKE_BUILD_TYPE=Release before_install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2 sdl2_mixer game-music-emu p7zip; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmake||true; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/release/SDL2-2.0.6.dmg; hdiutil attach SDL2-2.0.6.dmg; sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.dmg; hdiutil attach SDL2_mixer-2.0.1.dmg; sudo cp -a /Volumes/SDL2_mixer/SDL2_mixer.framework /Library/Frameworks/; fi - mkdir -p $HOME/srb2_cache From 0fbca9a84b0738be7b096a34bbcf38652e52c634 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 25 Mar 2019 15:21:52 -0400 Subject: [PATCH 13/51] CircleCI: also test compiling without BLUA support --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c3674a9e5..e5892b7c7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,8 +43,8 @@ jobs: - /var/cache/apt/archives - checkout - run: - name: Compile without network support - command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 + name: Compile without network support and BLUA + command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 NO_LUA=1 - run: name: Clean build command: make -C src LINUX=1 clean From 17768854e093e82fa4771c5cd794e90a116ee151 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 25 Mar 2019 15:30:25 -0400 Subject: [PATCH 14/51] P_SuperDamage() is too big for inlining --- src/p_inter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_inter.c b/src/p_inter.c index 009a2be1f..29450f6e1 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2643,7 +2643,7 @@ static void P_KillPlayer(player_t *player, mobj_t *source, INT32 damage) } } -static inline void P_SuperDamage(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 damage) +static void P_SuperDamage(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 damage) { fixed_t fallbackspeed; angle_t ang; From 042b30c6e56940276f5fd490b044465a722952ba Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 25 Mar 2019 15:34:25 -0400 Subject: [PATCH 15/51] CircleCI: rebuild depend file with BLUA --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e5892b7c7..1b0cf3407 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,10 @@ jobs: name: Compile without network support and BLUA command: make -C src LINUX=1 ERRORMODE=1 -k NONET=1 NO_LUA=1 - run: - name: Clean build + name: wipe build + command: make -C src LINUX=1 cleandep + - run: + name: rebuild depend command: make -C src LINUX=1 clean - restore_cache: keys: From 45c641204b1446705ec82689db9ccd4f0e9bbd88 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 25 Mar 2019 15:44:33 -0400 Subject: [PATCH 16/51] TravisCI: move homebrew packages for all mac builds --- .travis.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 07640f837..78a0a30dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -223,15 +223,6 @@ matrix: # #Apple LLVM version 7.0.2 (clang-700.1.81) - os: osx #osx_image: xcode7.3 - addons: - homebrew: - packages: - - sdl2 - - sdl2_mixer - - game-music-emu - - p7zip - - cmake - update: false #Apple LLVM version 7.3.0 (clang-703.0.31) allow_failures: - compiler: clang-3.5 @@ -256,6 +247,14 @@ addons: - libgl1-mesa-dev - libgme-dev - p7zip-full + homebrew: + packages: + - sdl2_mixer + - game-music-emu + - p7zip + - cmake + update: false + before_script: - wget --verbose --server-response -c http://rosenthalcastle.org/srb2/SRB2-v2115-assets-2.7z -O $HOME/srb2_cache/SRB2-v2115-assets-2.7z From d69d834c6add5dc7c6376ef9a3b1151d94c8e401 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 25 Mar 2019 15:48:33 -0400 Subject: [PATCH 17/51] use default osx image --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 78a0a30dc..f0ed0a8ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -221,9 +221,11 @@ matrix: # - os: osx # osx_image: xcode7.2 # #Apple LLVM version 7.0.2 (clang-700.1.81) +# - os: osx +# osx_image: xcode7.3 +# #Apple LLVM version 7.3.0 (clang-703.0.31) - os: osx - #osx_image: xcode7.3 - #Apple LLVM version 7.3.0 (clang-703.0.31) + #Default: macOS 10.13 and Xcode 9.4.1 allow_failures: - compiler: clang-3.5 - compiler: clang-3.6 From e47bf6274f7221cb0790439ea9816aa6647a0d94 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 25 Mar 2019 15:51:13 -0400 Subject: [PATCH 18/51] TravisCI: build custom sdl2_mixer build --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f0ed0a8ec..7ef0127b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -251,7 +251,7 @@ addons: - p7zip-full homebrew: packages: - - sdl2_mixer + - sdl2 - game-music-emu - p7zip - cmake @@ -268,6 +268,7 @@ before_script: - cmake .. -DCMAKE_BUILD_TYPE=Release before_install: + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2_mixer; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/release/SDL2-2.0.6.dmg; hdiutil attach SDL2-2.0.6.dmg; sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.dmg; hdiutil attach SDL2_mixer-2.0.1.dmg; sudo cp -a /Volumes/SDL2_mixer/SDL2_mixer.framework /Library/Frameworks/; fi - mkdir -p $HOME/srb2_cache From 15dbe3730b57399de96eb951e9fc978f83817215 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 25 Mar 2019 16:02:30 -0400 Subject: [PATCH 19/51] TravisCI: try updating homebew --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7ef0127b8..db81b9d91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -255,7 +255,7 @@ addons: - game-music-emu - p7zip - cmake - update: false + update: true before_script: From 208a8354792788b271eaf50146701d045fd0ce07 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 25 Mar 2019 16:30:02 -0400 Subject: [PATCH 20/51] TravisCI: install deps on sdl2_mixer --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index db81b9d91..252abe0f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -251,6 +251,9 @@ addons: - p7zip-full homebrew: packages: + - libmodplug + - liboog + - libvorbis - sdl2 - game-music-emu - p7zip From 05d2dcca970c7da6d5da616bc08337c11bd3267f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 25 Mar 2019 16:43:33 -0400 Subject: [PATCH 21/51] travisCI: add sdl2_mixer from mazmazz's srb2 tap --- .travis.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 252abe0f1..b723f44e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -250,11 +250,10 @@ addons: - libgme-dev - p7zip-full homebrew: + taps: + - mazmazz/srb2 packages: - - libmodplug - - liboog - - libvorbis - - sdl2 + - mazmazz/srb2/sdl2_mixer - game-music-emu - p7zip - cmake @@ -271,7 +270,6 @@ before_script: - cmake .. -DCMAKE_BUILD_TYPE=Release before_install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2_mixer; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/release/SDL2-2.0.6.dmg; hdiutil attach SDL2-2.0.6.dmg; sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.dmg; hdiutil attach SDL2_mixer-2.0.1.dmg; sudo cp -a /Volumes/SDL2_mixer/SDL2_mixer.framework /Library/Frameworks/; fi - mkdir -p $HOME/srb2_cache From e8a527b6dc7d8cae3323551544c9d09e8f2a9291 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 25 Mar 2019 16:59:47 -0400 Subject: [PATCH 22/51] TravisCI: use stock sdl2_mixer for prebuild bottle --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b723f44e3..15a3c844c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -253,7 +253,7 @@ addons: taps: - mazmazz/srb2 packages: - - mazmazz/srb2/sdl2_mixer + - sdl2_mixer - game-music-emu - p7zip - cmake From 9da1033467844467e5e05ac696d8b9488917d559 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 25 Mar 2019 21:35:04 +0000 Subject: [PATCH 23/51] Fix credits gamestate in dedicated mode, by properly separating the timer variable code from the drawing code in a semi-hacky way --- src/f_finale.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index 64e371211..bcdac295a 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1192,16 +1192,34 @@ void F_CreditDrawer(void) if (FixedMul(y,vid.dupy) > vid.height) break; } +} +void F_CreditTicker(void) +{ + // "Simulate" the drawing of the credits so that dedicated mode doesn't get stuck + UINT16 i; + fixed_t y = (80< vid.height) + break; + } + + // Do this here rather than in the drawer you doofus! (this is why dedicated mode broke at credits) if (!credits[i] && y <= 120< Date: Tue, 26 Mar 2019 11:54:54 -0400 Subject: [PATCH 24/51] mistype in merge of TavisCI config --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a96faf499..11294ab73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -260,7 +260,7 @@ matrix: # - os: osx # osx_image: xcode7.3 # #Apple LLVM version 7.3.0 (clang-703.0.31) - - osx: osx + - os: osx if: env(DPL_ENABLED) != "1" OR env(DPL_TERMINATE_TESTS) != "1" OR NOT branch =~ /^.*deployer.*$/ #Default: macOS 10.13 and Xcode 9.4.1 From 783f910d650808f6597342d550492ad2f9af1db9 Mon Sep 17 00:00:00 2001 From: Alam Arias Date: Tue, 26 Mar 2019 21:20:17 -0400 Subject: [PATCH 25/51] TravisCI: remove xcode7.3 on DPL mac build --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 11294ab73..b6f8a7aa7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -269,7 +269,6 @@ matrix: # Deployer Buildbots - OSX ################################ - os: osx - osx_image: xcode7.3 if: env(DPL_ENABLED) = "1" AND (env(_DPL_JOB_ENABLED) = "1" OR env(DPL_JOB_ENABLE_ALL) = "1") AND (branch =~ /^.*deployer.*$/ OR (tag IS present AND env(DPL_TAG_ENABLED) = "1")) AND env(DPL_TERMINATE_MAIN) != "1" From 40f351debb3c9758aec0a6d72c63f33d47da8303 Mon Sep 17 00:00:00 2001 From: Lachlan Wright Date: Wed, 27 Mar 2019 03:23:32 -0400 Subject: [PATCH 26/51] Add missing entry for SKINCOLOR_BUBBLEGUM in ColorOpposite() --- src/k_kart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/k_kart.c b/src/k_kart.c index 700758585..0421f625f 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -219,6 +219,7 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_SUNSET,10, // SKINCOLOR_MOONSLAM SKINCOLOR_MAUVE,10, // SKINCOLOR_ULTRAVIOLET SKINCOLOR_DAWN,6, // SKINCOLOR_DUSK + SKINCOLOR_POPCORN,11, // SKINCOLOR_BUBBLEGUM SKINCOLOR_EMERALD,8, // SKINCOLOR_PURPLE SKINCOLOR_PASTEL,11, // SKINCOLOR_FUCHSIA SKINCOLOR_MAROON,8, // SKINCOLOR_TOXIC From af1682d75845fa5d7a49c1a855c30ca4946d0b26 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 27 Mar 2019 18:23:03 -0400 Subject: [PATCH 27/51] CircleCI: Debian Jessie is dead, long live Debian Stretch --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1b0cf3407..74e360255 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: build: working_directory: /root/SRB2 docker: - - image: debian:jessie + - image: debian:stretch environment: CC: ccache gcc -m32 PKG_CONFIG_LIBDIR: /usr/lib/i386-linux-gnu/pkgconfig From 8d51de4993b43ac016aeba09d02410498be7ba96 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 27 Mar 2019 18:51:20 -0400 Subject: [PATCH 28/51] CircleCI: use libpng-dev --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 74e360255..1784ba1ea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,7 +36,7 @@ jobs: - v1-SRB2-APT - run: name: Install SDK - command: apt-get -qq -y --no-install-recommends install git build-essential nasm libpng12-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib upx openssh-client + command: apt-get -qq -y --no-install-recommends install git build-essential nasm libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib upx openssh-client - save_cache: key: v1-SRB2-APT paths: From e9869a55e351b09132ad4915d552d7cc71547079 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 4 Apr 2019 16:13:31 -0700 Subject: [PATCH 29/51] Let dedicated servers end vote time too! --- src/y_inter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/y_inter.c b/src/y_inter.c index 095b4ad36..c7e966c5f 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -1505,11 +1505,11 @@ void Y_EndVote(void) // static void Y_UnloadVoteData(void) { + voteclient.loaded = false; + if (rendermode != render_soft) return; - voteclient.loaded = false; - UNLOAD(widebgpatch); UNLOAD(bgpatch); UNLOAD(cursor); From 13bfbac72beb667da49c536cb1d6b2a4b88848b4 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Sat, 6 Apr 2019 21:59:58 -0400 Subject: [PATCH 30/51] Lua: fix K_PlayPowerGloatSound mistype --- src/lua_baselib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index dde57c2dd..d9a5fb1d7 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -2752,7 +2752,7 @@ static luaL_Reg lib[] = { // k_kart {"K_PlayAttackTaunt", lib_kAttackSound}, {"K_PlayBoostTaunt", lib_kBoostSound}, - {"K_PlayPowerGloatSund", lib_kGloatSound}, + {"K_PlayPowerGloatSound", lib_kGloatSound}, {"K_PlayOvertakeSound", lib_kOvertakeSound}, {"K_PlayLossSound", lib_kLossSound}, {"K_PlayHitEmSound", lib_kHitEmSound}, From bc2f78020b72796ace19d2777100cb2d41e366a5 Mon Sep 17 00:00:00 2001 From: Lachlan Wright Date: Wed, 10 Apr 2019 03:16:46 -0400 Subject: [PATCH 31/51] Update k_kart.c --- src/k_kart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index 0421f625f..9d928a2a2 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -219,7 +219,7 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_SUNSET,10, // SKINCOLOR_MOONSLAM SKINCOLOR_MAUVE,10, // SKINCOLOR_ULTRAVIOLET SKINCOLOR_DAWN,6, // SKINCOLOR_DUSK - SKINCOLOR_POPCORN,11, // SKINCOLOR_BUBBLEGUM + SKINCOLOR_POPCORN,12, // SKINCOLOR_BUBBLEGUM SKINCOLOR_EMERALD,8, // SKINCOLOR_PURPLE SKINCOLOR_PASTEL,11, // SKINCOLOR_FUCHSIA SKINCOLOR_MAROON,8, // SKINCOLOR_TOXIC From 5a6722a5e921c351b7491f28b38c5235e9f4f36c Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 14 Apr 2019 14:41:39 +0100 Subject: [PATCH 32/51] Precipitation being drawn at infinite distance when set to zero is incorrect behaviour. This is likely the consequence of a bad merge, but I don't care enough to check for certain. --- src/r_things.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/r_things.c b/src/r_things.c index a40830ac5..c43fe8324 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1796,7 +1796,7 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 viewnumber) } } - // Someone seriously wants infinite draw distance for precipitation? + // no, no infinite draw distance for precipitation. this option at zero is supposed to turn it off if ((limit_dist = (fixed_t)cv_drawdist_precip.value << FRACBITS)) { for (precipthing = sec->preciplist; precipthing; precipthing = precipthing->snext) @@ -1812,13 +1812,6 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel, UINT8 viewnumber) R_ProjectPrecipitationSprite(precipthing); } } - else - { - // Draw everything in sector, no checks - for (precipthing = sec->preciplist; precipthing; precipthing = precipthing->snext) - if (!(precipthing->precipflags & PCF_INVISIBLE)) - R_ProjectPrecipitationSprite(precipthing); - } } // From 7fd1f6c528f142af75a5374599db5895c3f1051a Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 14 Apr 2019 21:14:01 -0700 Subject: [PATCH 33/51] Support splitscreen PLAYERINFO and don't expose clients' IP addresses --- src/d_clisrv.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index e227ce2ed..5519d7b63 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1451,33 +1451,13 @@ static void SV_SendPlayerInfo(INT32 node) continue; } - netbuffer->u.playerinfo[i].node = (UINT8)playernode[i]; + netbuffer->u.playerinfo[i].node = i; strncpy(netbuffer->u.playerinfo[i].name, (const char *)&player_names[i], MAXPLAYERNAME+1); netbuffer->u.playerinfo[i].name[MAXPLAYERNAME] = '\0'; //fetch IP address - { - const char *claddress; - UINT32 numericaddress[4]; - - memset(netbuffer->u.playerinfo[i].address, 0, 4); - if (playernode[i] == 0) - { - //127.0.0.1 - netbuffer->u.playerinfo[i].address[0] = 127; - netbuffer->u.playerinfo[i].address[3] = 1; - } - else if (playernode[i] > 0 && I_GetNodeAddress && (claddress = I_GetNodeAddress(playernode[i])) != NULL) - { - if (sscanf(claddress, "%d.%d.%d.%d", &numericaddress[0], &numericaddress[1], &numericaddress[2], &numericaddress[3]) < 4) - goto badaddress; - netbuffer->u.playerinfo[i].address[0] = (UINT8)numericaddress[0]; - netbuffer->u.playerinfo[i].address[1] = (UINT8)numericaddress[1]; - netbuffer->u.playerinfo[i].address[2] = (UINT8)numericaddress[2]; - netbuffer->u.playerinfo[i].address[3] = (UINT8)numericaddress[3]; - } - } - badaddress: + //No, don't do that, you fuckface. + memset(netbuffer->u.playerinfo[i].address, 0, 4); if (G_GametypeHasTeams()) { From 7dae0ad87551042741646cbcd1109089208c6828 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 18 Apr 2019 22:41:50 -0700 Subject: [PATCH 34/51] Show rooms list in server browser initially If you haven't selected a room yet, you're shown the room list instead of server list. --- src/m_menu.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 3ad076ff7..fefafff31 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -7456,7 +7456,10 @@ static void M_ConnectMenu(INT32 choice) // first page of servers serverlistpage = 0; - M_SetupNextMenu(&MP_ConnectDef); + if (ms_RoomId < 0) + M_RoomMenu(0); // Select a room instead of staring at an empty list + else + M_SetupNextMenu(&MP_ConnectDef); itemOn = 0; M_Refresh(0); } @@ -7529,7 +7532,15 @@ static void M_ChooseRoom(INT32 choice) } serverlistpage = 0; - M_SetupNextMenu(currentMenu->prevMenu); + /* + We were on the Multiplayer menu? That means that we must have been trying to + view the server browser, but we hadn't selected a room yet. So we need to go + to the browser next, not back there. + */ + if (currentMenu->prevMenu == &MP_MainDef) + M_SetupNextMenu(&MP_ConnectDef); + else + M_SetupNextMenu(currentMenu->prevMenu); if (currentMenu == &MP_ConnectDef) M_Refresh(0); } From c2a14da4b52695eccda4d38bf91cfca50c179ede Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 18 Apr 2019 23:42:28 -0700 Subject: [PATCH 35/51] Add a command to increment cvars --- src/command.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/command.c b/src/command.c index a5d45bc1e..74b9ef51f 100644 --- a/src/command.c +++ b/src/command.c @@ -50,6 +50,7 @@ static void COM_Exec_f(void); static void COM_Wait_f(void); static void COM_Help_f(void); static void COM_Toggle_f(void); +static void COM_Add_f(void); static void CV_EnforceExecVersion(void); static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr); @@ -291,6 +292,7 @@ void COM_Init(void) COM_AddCommand("wait", COM_Wait_f); COM_AddCommand("help", COM_Help_f); COM_AddCommand("toggle", COM_Toggle_f); + COM_AddCommand("add", COM_Add_f); RegisterNetXCmd(XD_NETVAR, Got_NetVar); } @@ -855,6 +857,27 @@ static void COM_Toggle_f(void) CV_AddValue(cvar, +1); } +/** Command variant of CV_AddValue + */ +static void COM_Add_f(void) +{ + consvar_t *cvar; + + if (COM_Argc() != 3) + { + CONS_Printf(M_GetText("Add : Add to the value of a cvar. Negative values work too!\n")); + return; + } + cvar = CV_FindVar(COM_Argv(1)); + if (!cvar) + { + CONS_Alert(CONS_NOTICE, M_GetText("%s is not a cvar\n"), COM_Argv(1)); + return; + } + + CV_AddValue(cvar, atoi(COM_Argv(2))); +} + // ========================================================================= // VARIABLE SIZE BUFFERS // ========================================================================= From 6a5bb9f23f5985a6d25a8839cf1b7a3f151b89fb Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 18 Apr 2019 23:50:29 -0700 Subject: [PATCH 36/51] Add a "-noaudio" parm to cover "-nomusic" and "-nosound" --- src/d_main.c | 25 ++++++++++++++++++------- src/s_sound.c | 6 +++--- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 84d5a6f32..82f3721a5 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1390,10 +1390,9 @@ void D_SRB2Main(void) midi_disabled = true; #endif } - if (M_CheckParm("-nosound")) - sound_disabled = true; - if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic + if (M_CheckParm("-noaudio")) // combines -nosound and -nomusic { + sound_disabled = true; digital_disabled = true; #ifndef NO_MIDI midi_disabled = true; @@ -1401,12 +1400,24 @@ void D_SRB2Main(void) } else { + if (M_CheckParm("-nosound")) + sound_disabled = true; + if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic + { + digital_disabled = true; #ifndef NO_MIDI - if (M_CheckParm("-nomidimusic")) - midi_disabled = true; // WARNING: DOS version initmusic in I_StartupSound + midi_disabled = true; #endif - if (M_CheckParm("-nodigmusic")) - digital_disabled = true; // WARNING: DOS version initmusic in I_StartupSound + } + else + { +#ifndef NO_MIDI + if (M_CheckParm("-nomidimusic")) + midi_disabled = true; // WARNING: DOS version initmusic in I_StartupSound +#endif + if (M_CheckParm("-nodigmusic")) + digital_disabled = true; // WARNING: DOS version initmusic in I_StartupSound + } } if (!( sound_disabled && digital_disabled #ifndef NO_MIDI diff --git a/src/s_sound.c b/src/s_sound.c index 2ddffa3f5..58cc0592f 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2182,7 +2182,7 @@ static void Command_RestartAudio_f(void) void GameSounds_OnChange(void) { - if (M_CheckParm("-nosound")) + if (M_CheckParm("-nosound") || M_CheckParm("-noaudio")) return; if (sound_disabled) @@ -2196,7 +2196,7 @@ void GameSounds_OnChange(void) void GameDigiMusic_OnChange(void) { - if (M_CheckParm("-nomusic")) + if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio")) return; else if (M_CheckParm("-nodigmusic")) return; @@ -2239,7 +2239,7 @@ void GameDigiMusic_OnChange(void) #ifndef NO_MIDI void GameMIDIMusic_OnChange(void) { - if (M_CheckParm("-nomusic")) + if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio")) return; else if (M_CheckParm("-nomidimusic")) return; From 870f29f8616f0c99e262e5f2ab172d2228a93d48 Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Sun, 21 Apr 2019 07:52:01 -0500 Subject: [PATCH 37/51] Flashing tics on respawn --- src/k_kart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index 9d928a2a2..17790bf00 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1568,7 +1568,7 @@ void K_RespawnChecker(player_t *player) if (!P_IsObjectOnGround(player->mo) && !mapreset) { - player->powers[pw_flashing] = 2; + player->powers[pw_flashing] = K_GetKartFlashing(player); // Sal: The old behavior was stupid and prone to accidental usage. // Let's rip off Mania instead, and turn this into a Drop Dash! From 3e838c1e831d363c953692b73ab643cf3ba61083 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Mon, 22 Apr 2019 00:29:47 -0400 Subject: [PATCH 38/51] New IntermissionThinker hook --- src/lua_hook.h | 3 +++ src/lua_hooklib.c | 23 +++++++++++++++++++++++ src/y_inter.c | 11 ++++++++--- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/lua_hook.h b/src/lua_hook.h index 126e7e405..e61acdf13 100644 --- a/src/lua_hook.h +++ b/src/lua_hook.h @@ -51,6 +51,7 @@ enum hook { hook_PlayerExplode, //SRB2KART hook_PlayerSquish, //SRB2KART hook_PlayerCmd, //SRB2KART + hook_IntermissionThinker, //SRB2KART hook_MAX // last hook }; @@ -99,4 +100,6 @@ boolean LUAh_PlayerSquish(player_t *player, mobj_t *inflictor, mobj_t *source); boolean LUAh_PlayerCmd(player_t *player, ticcmd_t *cmd); // Allows to write to player cmd before the game does anything with them. +void LUAh_IntermissionThinker(void); // Hook for Y_Ticker + #endif diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c index 5a95877e3..c15d13a0c 100644 --- a/src/lua_hooklib.c +++ b/src/lua_hooklib.c @@ -62,6 +62,7 @@ const char *const hookNames[hook_MAX+1] = { "PlayerExplode", "PlayerSquish", "PlayerCmd", + "IntermissionThinker", NULL }; @@ -420,6 +421,28 @@ void LUAh_ThinkFrame(void) } } +// Hook for Y_Ticker +void LUAh_IntermissionThinker(void) +{ + hook_p hookp; + if (!gL || !(hooksAvailable[hook_IntermissionThinker/8] & (1<<(hook_IntermissionThinker%8)))) + return; + + for (hookp = roothook; hookp; hookp = hookp->next) + if (hookp->type == hook_IntermissionThinker) + { + lua_pushfstring(gL, FMT_HOOKID, hookp->id); + lua_gettable(gL, LUA_REGISTRYINDEX); + if (lua_pcall(gL, 0, 0, 0)) { + if (!hookp->error || cv_debug & DBG_LUA) + CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1)); + lua_pop(gL, 1); + hookp->error = true; + } + } +} + + // Hook for mobj collisions UINT8 LUAh_MobjCollideHook(mobj_t *thing1, mobj_t *thing2, enum hook which) { diff --git a/src/y_inter.c b/src/y_inter.c index 095b4ad36..18c6ab330 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -40,6 +40,7 @@ #include "g_input.h" // PLAYER1INPUTDOWN #include "k_kart.h" // colortranslations #include "console.h" // cons_menuhighlight +#include "lua_hook.h" // IntermissionThinker hook #ifdef HWRENDER #include "hardware/hw_main.h" @@ -574,13 +575,17 @@ void Y_Ticker(void) if (paused || P_AutoPause()) return; +#ifdef HAVE_BLUA + LUAh_IntermissionThinker(); +#endif + intertic++; // Team scramble code for team match and CTF. - // Don't do this if we're going to automatically scramble teams next round. + // Don't do this if we' + // If we run out re going to automatically scramble teams next round. /*if (G_GametypeHasTeams() && cv_teamscramble.value && !cv_scrambleonchange.value && server) - { - // If we run out of time in intermission, the beauty is that + {of time in intermission, the beauty is that // the P_Ticker() team scramble code will pick it up. if ((intertic % (TICRATE/7)) == 0) P_DoTeamscrambling(); From 60428fbc29cc5725f97e0130cf6c668164825a94 Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Mon, 22 Apr 2019 11:29:44 +0200 Subject: [PATCH 39/51] Add option to turn off the PLAY default md2 --- src/hardware/hw_main.c | 2 +- src/hardware/hw_main.h | 1 + src/m_menu.c | 3 ++- src/r_main.c | 1 + src/v_video.c | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 4fcef218a..47148a9d0 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5261,7 +5261,7 @@ static void HWR_DrawSprites(void) if (spr->mobj && spr->mobj->skin && spr->mobj->sprite == SPR_PLAY) { // 8/1/19: Only don't display player models if no default SPR_PLAY is found. - if (!cv_grmd2.value || ((md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound || md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale < 0.0f) && (md2_models[SPR_PLAY].notfound || md2_models[SPR_PLAY].scale < 0.0f))) + if (!cv_grmd2.value || ((md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound || md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale < 0.0f) && ((!cv_grdefaultmd2.value) || md2_models[SPR_PLAY].notfound || md2_models[SPR_PLAY].scale < 0.0f))) HWR_DrawSprite(spr); else HWR_DrawMD2(spr); diff --git a/src/hardware/hw_main.h b/src/hardware/hw_main.h index 6978856ea..4d639fafb 100644 --- a/src/hardware/hw_main.h +++ b/src/hardware/hw_main.h @@ -81,6 +81,7 @@ extern consvar_t cv_grcoronas; extern consvar_t cv_grcoronasize; #endif extern consvar_t cv_grmd2; +extern consvar_t cv_grdefaultmd2; extern consvar_t cv_grfog; extern consvar_t cv_grfogcolor; extern consvar_t cv_grfogdensity; diff --git a/src/m_menu.c b/src/m_menu.c index 3ad076ff7..ddee98744 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1218,7 +1218,8 @@ static menuitem_t OP_VideoOptionsMenu[] = #ifdef HWRENDER {IT_STRING | IT_CVAR, NULL, "3D models", &cv_grmd2, 105}, - {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 115}, + {IT_STRING | IT_CVAR, NULL, "Default 3D model", &cv_grdefaultmd2, 115}, + {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 125}, #endif }; diff --git a/src/r_main.c b/src/r_main.c index 36182d0e8..92c029b9f 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1571,6 +1571,7 @@ void R_RegisterEngineStuff(void) CV_RegisterVar(&cv_grcoronasize); #endif CV_RegisterVar(&cv_grmd2); + CV_RegisterVar(&cv_grdefaultmd2); #endif #ifdef HWRENDER diff --git a/src/v_video.c b/src/v_video.c index 473adeedb..08ec8d3cf 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -81,6 +81,7 @@ consvar_t cv_grcoronasize = {"gr_coronasize", "1", CV_SAVE| CV_FLOAT, 0, NULL, 0 //static CV_PossibleValue_t CV_MD2[] = {{0, "Off"}, {1, "On"}, {2, "Old"}, {0, NULL}}; // console variables in development consvar_t cv_grmd2 = {"gr_md2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_grdefaultmd2 = {"gr_defaultmd2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; #endif const UINT8 gammatable[5][256] = From 80d1181cff29a84d97a0967a334e20f300a740bc Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Mon, 22 Apr 2019 19:27:42 -0400 Subject: [PATCH 40/51] Fix mangled comment --- src/y_inter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/y_inter.c b/src/y_inter.c index 18c6ab330..61f17626b 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -582,10 +582,10 @@ void Y_Ticker(void) intertic++; // Team scramble code for team match and CTF. - // Don't do this if we' - // If we run out re going to automatically scramble teams next round. + // Don't do this if we're going to automatically scramble teams next round. /*if (G_GametypeHasTeams() && cv_teamscramble.value && !cv_scrambleonchange.value && server) - {of time in intermission, the beauty is that + { + // If we run out of time in intermission, the beauty is that // the P_Ticker() team scramble code will pick it up. if ((intertic % (TICRATE/7)) == 0) P_DoTeamscrambling(); From 9cac5f52779726b1cb655c817d9c0d89e7223ea9 Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Mon, 22 Apr 2019 04:24:07 -0500 Subject: [PATCH 41/51] Don't cut off flashing tics when using sneakers, don't allow stealing bumpers while intangible --- src/k_kart.c | 1 - src/p_map.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 9d928a2a2..79cfe8763 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3526,7 +3526,6 @@ void K_DoSneaker(player_t *player, INT32 type) { player->pflags |= PF_ATTACKDOWN; K_PlayBoostTaunt(player->mo); - player->powers[pw_flashing] = 0; // Stop flashing after boosting } } diff --git a/src/p_map.c b/src/p_map.c index 256c9cef1..07f8abbda 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1580,12 +1580,12 @@ static boolean PIT_CheckThing(mobj_t *thing) if (G_BattleGametype()) { - if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer])) + if (thing->player->kartstuff[k_sneakertimer] && !(tmthing->player->kartstuff[k_sneakertimer]) && !(thing->player->powers[pw_flashing])) // Don't steal bumpers while intangible { K_StealBumper(thing->player, tmthing->player, false); K_SpinPlayer(tmthing->player, thing, 0, tmthing, false); } - else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer])) + else if (tmthing->player->kartstuff[k_sneakertimer] && !(thing->player->kartstuff[k_sneakertimer]) && !(tmthing->player->powers[pw_flashing])) { K_StealBumper(tmthing->player, thing->player, false); K_SpinPlayer(thing->player, tmthing, 0, thing, false); From 313b971e17dffbf7560875e2036d448c6cd33439 Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Mon, 22 Apr 2019 10:39:42 +0200 Subject: [PATCH 42/51] Fix SPB being way too fast in current sections where the player has no control --- src/p_enemy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/p_enemy.c b/src/p_enemy.c index d62ec7efb..31a5a61bf 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8434,6 +8434,9 @@ void A_SPBChase(mobj_t *actor) wspeed = (3*defspeed)/2; if (wspeed < 20*actor->tracer->scale) wspeed = 20*actor->tracer->scale; + if (actor->tracer->player->pflags & PF_SLIDING) + wspeed = actor->tracer->player->speed/2; + // ^^^^ current section: These are annoying, and grand metropolis in particular needs this. hang = R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y); vang = R_PointToAngle2(0, actor->z, dist, actor->tracer->z); From dab5469b4aa0045f0e6991688af406436d7a7566 Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Tue, 23 Apr 2019 23:49:46 +0200 Subject: [PATCH 43/51] Terminology changes --- src/hardware/hw_main.c | 2 +- src/hardware/hw_main.h | 2 +- src/m_menu.c | 2 +- src/r_main.c | 2 +- src/v_video.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 47148a9d0..3bb0627ee 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5261,7 +5261,7 @@ static void HWR_DrawSprites(void) if (spr->mobj && spr->mobj->skin && spr->mobj->sprite == SPR_PLAY) { // 8/1/19: Only don't display player models if no default SPR_PLAY is found. - if (!cv_grmd2.value || ((md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound || md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale < 0.0f) && ((!cv_grdefaultmd2.value) || md2_models[SPR_PLAY].notfound || md2_models[SPR_PLAY].scale < 0.0f))) + if (!cv_grmd2.value || ((md2_playermodels[(skin_t*)spr->mobj->skin-skins].notfound || md2_playermodels[(skin_t*)spr->mobj->skin-skins].scale < 0.0f) && ((!cv_grfallbackplayermodel.value) || md2_models[SPR_PLAY].notfound || md2_models[SPR_PLAY].scale < 0.0f))) HWR_DrawSprite(spr); else HWR_DrawMD2(spr); diff --git a/src/hardware/hw_main.h b/src/hardware/hw_main.h index 4d639fafb..720e82ee2 100644 --- a/src/hardware/hw_main.h +++ b/src/hardware/hw_main.h @@ -81,7 +81,7 @@ extern consvar_t cv_grcoronas; extern consvar_t cv_grcoronasize; #endif extern consvar_t cv_grmd2; -extern consvar_t cv_grdefaultmd2; +extern consvar_t cv_grfallbackplayermodel; extern consvar_t cv_grfog; extern consvar_t cv_grfogcolor; extern consvar_t cv_grfogdensity; diff --git a/src/m_menu.c b/src/m_menu.c index ddee98744..10f8eae03 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1218,7 +1218,7 @@ static menuitem_t OP_VideoOptionsMenu[] = #ifdef HWRENDER {IT_STRING | IT_CVAR, NULL, "3D models", &cv_grmd2, 105}, - {IT_STRING | IT_CVAR, NULL, "Default 3D model", &cv_grdefaultmd2, 115}, + {IT_STRING | IT_CVAR, NULL, "Fallback Player 3D Model", &cv_grfallbackplayermodel, 115}, {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 125}, #endif }; diff --git a/src/r_main.c b/src/r_main.c index 92c029b9f..a33280841 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1571,7 +1571,7 @@ void R_RegisterEngineStuff(void) CV_RegisterVar(&cv_grcoronasize); #endif CV_RegisterVar(&cv_grmd2); - CV_RegisterVar(&cv_grdefaultmd2); + CV_RegisterVar(&cv_grfallbackplayermodel); #endif #ifdef HWRENDER diff --git a/src/v_video.c b/src/v_video.c index 08ec8d3cf..ae4783947 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -81,7 +81,7 @@ consvar_t cv_grcoronasize = {"gr_coronasize", "1", CV_SAVE| CV_FLOAT, 0, NULL, 0 //static CV_PossibleValue_t CV_MD2[] = {{0, "Off"}, {1, "On"}, {2, "Old"}, {0, NULL}}; // console variables in development consvar_t cv_grmd2 = {"gr_md2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cv_grdefaultmd2 = {"gr_defaultmd2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_grfallbackplayermodel = {"gr_fallbackplayermodel", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; #endif const UINT8 gammatable[5][256] = From cae59aad9a21a625c1a39c7a81598df833d42d6b Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Thu, 25 Apr 2019 23:13:09 -0400 Subject: [PATCH 44/51] Save showjoinaddress to config --- src/d_clisrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index e227ce2ed..0c440c176 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -167,7 +167,7 @@ ticcmd_t netcmds[BACKUPTICS][MAXPLAYERS]; static textcmdtic_t *textcmds[TEXTCMD_HASH_SIZE] = {NULL}; -consvar_t cv_showjoinaddress = {"showjoinaddress", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_showjoinaddress = {"showjoinaddress", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; static CV_PossibleValue_t playbackspeed_cons_t[] = {{1, "MIN"}, {10, "MAX"}, {0, NULL}}; consvar_t cv_playbackspeed = {"playbackspeed", "1", 0, playbackspeed_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; From 2e221946777c2d0b287059aceb59a4aa3478da86 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 26 Apr 2019 18:18:53 -0400 Subject: [PATCH 45/51] Final v1 colors - 11 new colors: Skunk, Artichoke, Pigeon, Walnut, Cinnamon, Lemonade, Quarry, Crocodile, Azure, Thunder, & Wristwatch - Updated Dawn, Sunset, Cream, Gold, Olive, Vomit, Lime, Plague, & Caribbean - Updated opposite colors for Bubblegum & Camouflage in response to the new colors --- src/dehacked.c | 17 +++++++++----- src/doomdef.h | 11 +++++++++ src/hu_stuff.c | 11 +++++++++ src/k_kart.c | 60 +++++++++++++++++++++++++++++++++++++++----------- 4 files changed, 81 insertions(+), 18 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 1c88fe832..0431eb0c7 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -8135,29 +8135,35 @@ static const char *const ML_LIST[16] = { // This DOES differ from r_draw's Color_Names, unfortunately. // Also includes Super colors -static const char *COLOR_ENUMS[] = { // Rejigged for Kart. +static const char *COLOR_ENUMS[] = { // Rejigged for Kart. "NONE", // SKINCOLOR_NONE "WHITE", // SKINCOLOR_WHITE "SILVER", // SKINCOLOR_SILVER "GREY", // SKINCOLOR_GREY "NICKEL", // SKINCOLOR_NICKEL "BLACK", // SKINCOLOR_BLACK + "SKUNK", // SKINCOLOR_SKUNK "FAIRY", // SKINCOLOR_FAIRY "POPCORN", // SKINCOLOR_POPCORN + "ARTICHOKE", // SKINCOLOR_ARTICHOKE + "PIGEON", // SKINCOLOR_PIGEON "SEPIA", // SKINCOLOR_SEPIA "BEIGE", // SKINCOLOR_BEIGE + "WALNUT", // SKINCOLOR_WALNUT "BROWN", // SKINCOLOR_BROWN "LEATHER", // SKINCOLOR_LEATHER "SALMON", // SKINCOLOR_SALMON "PINK", // SKINCOLOR_PINK "ROSE", // SKINCOLOR_ROSE "BRICK", // SKINCOLOR_BRICK + "CINNAMON", // SKINCOLOR_CINNAMON "RUBY", // SKINCOLOR_RUBY "RASPBERRY", // SKINCOLOR_RASPBERRY "CHERRY", // SKINCOLOR_CHERRY "RED", // SKINCOLOR_RED "CRIMSON", // SKINCOLOR_CRIMSON "MAROON", // SKINCOLOR_MAROON + "LEMONADE", // SKINCOLOR_LEMONADE "FLAME", // SKINCOLOR_FLAME "SCARLET", // SKINCOLOR_SCARLET "KETCHUP", // SKINCOLOR_KETCHUP @@ -8176,8 +8182,10 @@ static const char *COLOR_ENUMS[] = { // Rejigged for Kart. "ROYAL", // SKINCOLOR_ROYAL "BRONZE", // SKINCOLOR_BRONZE "COPPER", // SKINCOLOR_COPPER + "QUARRY", // SKINCOLOR_QUARRY "YELLOW", // SKINCOLOR_YELLOW "MUSTARD", // SKINCOLOR_MUSTARD + "CROCODILE", // SKINCOLOR_CROCODILE "OLIVE", // SKINCOLOR_OLIVE "VOMIT", // SKINCOLOR_VOMIT "GARDEN", // SKINCOLOR_GARDEN @@ -8197,6 +8205,7 @@ static const char *COLOR_ENUMS[] = { // Rejigged for Kart. "PLAGUE", // SKINCOLOR_PLAGUE "ALGAE", // SKINCOLOR_ALGAE "CARIBBEAN", // SKINCOLOR_CARIBBEAN + "AZURE", // SKINCOLOR_AZURE "AQUA", // SKINCOLOR_AQUA "TEAL", // SKINCOLOR_TEAL "CYAN", // SKINCOLOR_CYAN @@ -8206,7 +8215,9 @@ static const char *COLOR_ENUMS[] = { // Rejigged for Kart. "PLATINUM", // SKINCOLOR_PLATINUM "SLATE", // SKINCOLOR_SLATE "STEEL", // SKINCOLOR_STEEL + "THUNDER", // SKINCOLOR_THUNDER "RUST", // SKINCOLOR_RUST + "WRISTWATCH", // SKINCOLOR_WRISTWATCH "JET", // SKINCOLOR_JET "SAPPHIRE", // SKINCOLOR_SAPPHIRE "PERIWINKLE", // SKINCOLOR_PERIWINKLE @@ -8227,10 +8238,6 @@ static const char *COLOR_ENUMS[] = { // Rejigged for Kart. "POMEGRANATE", // SKINCOLOR_POMEGRANATE "LILAC", // SKINCOLOR_LILAC - - - - // Special super colors // Super Sonic Yellow "SUPER1", // SKINCOLOR_SUPER1 diff --git a/src/doomdef.h b/src/doomdef.h index 6664ff51a..07761c60f 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -256,22 +256,28 @@ typedef enum SKINCOLOR_GREY, SKINCOLOR_NICKEL, SKINCOLOR_BLACK, + SKINCOLOR_SKUNK, SKINCOLOR_FAIRY, SKINCOLOR_POPCORN, + SKINCOLOR_ARTICHOKE, + SKINCOLOR_PIGEON, SKINCOLOR_SEPIA, SKINCOLOR_BEIGE, + SKINCOLOR_WALNUT, SKINCOLOR_BROWN, SKINCOLOR_LEATHER, SKINCOLOR_SALMON, SKINCOLOR_PINK, SKINCOLOR_ROSE, SKINCOLOR_BRICK, + SKINCOLOR_CINNAMON, SKINCOLOR_RUBY, SKINCOLOR_RASPBERRY, SKINCOLOR_CHERRY, SKINCOLOR_RED, SKINCOLOR_CRIMSON, SKINCOLOR_MAROON, + SKINCOLOR_LEMONADE, SKINCOLOR_FLAME, SKINCOLOR_SCARLET, SKINCOLOR_KETCHUP, @@ -290,8 +296,10 @@ typedef enum SKINCOLOR_ROYAL, SKINCOLOR_BRONZE, SKINCOLOR_COPPER, + SKINCOLOR_QUARRY, SKINCOLOR_YELLOW, SKINCOLOR_MUSTARD, + SKINCOLOR_CROCODILE, SKINCOLOR_OLIVE, SKINCOLOR_VOMIT, SKINCOLOR_GARDEN, @@ -311,6 +319,7 @@ typedef enum SKINCOLOR_PLAGUE, SKINCOLOR_ALGAE, SKINCOLOR_CARIBBEAN, + SKINCOLOR_AZURE, SKINCOLOR_AQUA, SKINCOLOR_TEAL, SKINCOLOR_CYAN, @@ -320,7 +329,9 @@ typedef enum SKINCOLOR_PLATINUM, SKINCOLOR_SLATE, SKINCOLOR_STEEL, + SKINCOLOR_THUNDER, SKINCOLOR_RUST, + SKINCOLOR_WRISTWATCH, SKINCOLOR_JET, SKINCOLOR_SAPPHIRE, // sweet mother, i cannot weave - slender aphrodite has overcome me with longing for a girl SKINCOLOR_PERIWINKLE, diff --git a/src/hu_stuff.c b/src/hu_stuff.c index b43570735..cb9499c6d 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -793,14 +793,17 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) case SKINCOLOR_GREY: case SKINCOLOR_NICKEL: case SKINCOLOR_BLACK: + case SKINCOLOR_SKUNK: case SKINCOLOR_JET: cstart = "\x86"; // V_GRAYMAP break; case SKINCOLOR_SEPIA: case SKINCOLOR_BEIGE: + case SKINCOLOR_WALNUT: case SKINCOLOR_BROWN: case SKINCOLOR_LEATHER: case SKINCOLOR_RUST: + case SKINCOLOR_WRISTWATCH: cstart = "\x8e"; // V_BROWNMAP break; case SKINCOLOR_FAIRY: @@ -808,10 +811,12 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) case SKINCOLOR_PINK: case SKINCOLOR_ROSE: case SKINCOLOR_BRICK: + case SKINCOLOR_LEMONADE: case SKINCOLOR_BUBBLEGUM: case SKINCOLOR_LILAC: cstart = "\x8d"; // V_PINKMAP break; + case SKINCOLOR_CINNAMON: case SKINCOLOR_RUBY: case SKINCOLOR_RASPBERRY: case SKINCOLOR_CHERRY: @@ -842,14 +847,18 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) case SKINCOLOR_ROYAL: case SKINCOLOR_BRONZE: case SKINCOLOR_COPPER: + case SKINCOLOR_THUNDER: cstart = "\x8A"; // V_GOLDMAP break; case SKINCOLOR_POPCORN: + case SKINCOLOR_QUARRY: case SKINCOLOR_YELLOW: case SKINCOLOR_MUSTARD: + case SKINCOLOR_CROCODILE: case SKINCOLOR_OLIVE: cstart = "\x82"; // V_YELLOWMAP break; + case SKINCOLOR_ARTICHOKE: case SKINCOLOR_VOMIT: case SKINCOLOR_GARDEN: case SKINCOLOR_TEA: @@ -872,6 +881,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) cstart = "\x83"; // V_GREENMAP break; case SKINCOLOR_CARIBBEAN: + case SKINCOLOR_AZURE: case SKINCOLOR_AQUA: case SKINCOLOR_TEAL: case SKINCOLOR_CYAN: @@ -881,6 +891,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum) case SKINCOLOR_SAPPHIRE: cstart = "\x88"; // V_SKYMAP break; + case SKINCOLOR_PIGEON: case SKINCOLOR_PLATINUM: case SKINCOLOR_STEEL: cstart = "\x8c"; // V_STEELMAP diff --git a/src/k_kart.c b/src/k_kart.c index 79cfe8763..df65a7c9e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -49,22 +49,28 @@ const char *KartColor_Names[MAXSKINCOLORS] = "Grey", // SKINCOLOR_GREY "Nickel", // SKINCOLOR_NICKEL "Black", // SKINCOLOR_BLACK + "Skunk", // SKINCOLOR_SKUNK "Fairy", // SKINCOLOR_FAIRY "Popcorn", // SKINCOLOR_POPCORN + "Artichoke", // SKINCOLOR_ARTICHOKE + "Pigeon", // SKINCOLOR_PIGEON "Sepia", // SKINCOLOR_SEPIA "Beige", // SKINCOLOR_BEIGE + "Walnut", // SKINCOLOR_WALNUT "Brown", // SKINCOLOR_BROWN "Leather", // SKINCOLOR_LEATHER "Salmon", // SKINCOLOR_SALMON "Pink", // SKINCOLOR_PINK "Rose", // SKINCOLOR_ROSE "Brick", // SKINCOLOR_BRICK + "Cinnamon", // SKINCOLOR_CINNAMON "Ruby", // SKINCOLOR_RUBY "Raspberry", // SKINCOLOR_RASPBERRY "Cherry", // SKINCOLOR_CHERRY "Red", // SKINCOLOR_RED "Crimson", // SKINCOLOR_CRIMSON "Maroon", // SKINCOLOR_MAROON + "Lemonade", // SKINCOLOR_LEMONADE "Flame", // SKINCOLOR_FLAME "Scarlet", // SKINCOLOR_SCARLET "Ketchup", // SKINCOLOR_KETCHUP @@ -83,8 +89,10 @@ const char *KartColor_Names[MAXSKINCOLORS] = "Royal", // SKINCOLOR_ROYAL "Bronze", // SKINCOLOR_BRONZE "Copper", // SKINCOLOR_COPPER + "Quarry", // SKINCOLOR_QUARRY "Yellow", // SKINCOLOR_YELLOW "Mustard", // SKINCOLOR_MUSTARD + "Crocodile", // SKINCOLOR_CROCODILE "Olive", // SKINCOLOR_OLIVE "Vomit", // SKINCOLOR_VOMIT "Garden", // SKINCOLOR_GARDEN @@ -104,6 +112,7 @@ const char *KartColor_Names[MAXSKINCOLORS] = "Plague", // SKINCOLOR_PLAGUE "Algae", // SKINCOLOR_ALGAE "Caribbean", // SKINCOLOR_CARIBBEAN + "Azure", // SKINCOLOR_AZURE "Aqua", // SKINCOLOR_AQUA "Teal", // SKINCOLOR_TEAL "Cyan", // SKINCOLOR_CYAN @@ -113,7 +122,9 @@ const char *KartColor_Names[MAXSKINCOLORS] = "Platinum", // SKINCOLOR_PLATINUM "Slate", // SKINCOLOR_SLATE "Steel", // SKINCOLOR_STEEL + "Thunder", // SKINCOLOR_THUNDER "Rust", // SKINCOLOR_RUST + "Wristwatch", // SKINCOLOR_WRISTWATCH "Jet", // SKINCOLOR_JET "Sapphire", // SKINCOLOR_SAPPHIRE "Periwinkle", // SKINCOLOR_PERIWINKLE @@ -144,22 +155,28 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_GREY,8, // SKINCOLOR_GREY SKINCOLOR_SILVER,8, // SKINCOLOR_NICKEL SKINCOLOR_WHITE,8, // SKINCOLOR_BLACK - SKINCOLOR_CAMOUFLAGE,8, // SKINCOLOR_FAIRY - SKINCOLOR_BUBBLEGUM,8, // SKINCOLOR_POPCORN + SKINCOLOR_SKUNK,8, // SKINCOLOR_SKUNK + SKINCOLOR_ARTICHOKE,12, // SKINCOLOR_FAIRY + SKINCOLOR_PIGEON,12, // SKINCOLOR_POPCORN + SKINCOLOR_FAIRY,12, // SKINCOLOR_ARTICHOKE + SKINCOLOR_POPCORN,12, // SKINCOLOR_PIGEON SKINCOLOR_LEATHER,6, // SKINCOLOR_SEPIA SKINCOLOR_BROWN,2, // SKINCOLOR_BEIGE + SKINCOLOR_CAMOUFLAGE,8, // SKINCOLOR_WALNUT SKINCOLOR_BEIGE,8, // SKINCOLOR_BROWN SKINCOLOR_SEPIA,8, // SKINCOLOR_LEATHER SKINCOLOR_TEA,8, // SKINCOLOR_SALMON SKINCOLOR_PISTACHIO,8, // SKINCOLOR_PINK SKINCOLOR_MOSS,8, // SKINCOLOR_ROSE SKINCOLOR_RUST,8, // SKINCOLOR_BRICK + SKINCOLOR_WRISTWATCH,6, // SKINCOLOR_CINNAMON SKINCOLOR_SAPPHIRE,8, // SKINCOLOR_RUBY SKINCOLOR_MINT,8, // SKINCOLOR_RASPBERRY SKINCOLOR_HANDHELD,10, // SKINCOLOR_CHERRY SKINCOLOR_GREEN,6, // SKINCOLOR_RED SKINCOLOR_PINETREE,6, // SKINCOLOR_CRIMSON SKINCOLOR_TOXIC,8, // SKINCOLOR_MAROON + SKINCOLOR_THUNDER,8, // SKINCOLOR_LEMONADE SKINCOLOR_CARIBBEAN,10, // SKINCOLOR_FLAME SKINCOLOR_ALGAE,10, // SKINCOLOR_SCARLET SKINCOLOR_MUSTARD,10, // SKINCOLOR_KETCHUP @@ -178,8 +195,10 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_PLATINUM,6, // SKINCOLOR_ROYAL SKINCOLOR_STEEL,8, // SKINCOLOR_BRONZE SKINCOLOR_CREAM,6, // SKINCOLOR_COPPER + SKINCOLOR_AZURE,8, // SKINCOLOR_QUARRY SKINCOLOR_AQUA,8, // SKINCOLOR_YELLOW SKINCOLOR_KETCHUP,8, // SKINCOLOR_MUSTARD + SKINCOLOR_BUBBLEGUM,8, // SKINCOLOR_CROCODILE SKINCOLOR_TEAL,8, // SKINCOLOR_OLIVE SKINCOLOR_ROBOHOOD,8, // SKINCOLOR_VOMIT SKINCOLOR_LAVENDER,6, // SKINCOLOR_GARDEN @@ -188,7 +207,7 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_SALMON,8, // SKINCOLOR_TEA SKINCOLOR_PINK,6, // SKINCOLOR_PISTACHIO SKINCOLOR_ROSE,8, // SKINCOLOR_MOSS - SKINCOLOR_FAIRY,10, // SKINCOLOR_CAMOUFLAGE + SKINCOLOR_WALNUT,8, // SKINCOLOR_CAMOUFLAGE SKINCOLOR_VOMIT,8, // SKINCOLOR_ROBOHOOD SKINCOLOR_RASPBERRY,8, // SKINCOLOR_MINT SKINCOLOR_RED,8, // SKINCOLOR_GREEN @@ -199,6 +218,7 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_NOVA,8, // SKINCOLOR_PLAGUE SKINCOLOR_SCARLET,10, // SKINCOLOR_ALGAE SKINCOLOR_FLAME,8, // SKINCOLOR_CARIBBEAN + SKINCOLOR_QUARRY,8, // SKINCOLOR_AZURE SKINCOLOR_YELLOW,8, // SKINCOLOR_AQUA SKINCOLOR_OLIVE,8, // SKINCOLOR_TEAL SKINCOLOR_PEACH,8, // SKINCOLOR_CYAN @@ -208,7 +228,9 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_ROYAL,8, // SKINCOLOR_PLATINUM SKINCOLOR_GOLD,10, // SKINCOLOR_SLATE SKINCOLOR_BRONZE,10, // SKINCOLOR_STEEL + SKINCOLOR_LEMONADE,8, // SKINCOLOR_THUNDER SKINCOLOR_BRICK,10, // SKINCOLOR_RUST + SKINCOLOR_CINNAMON,8, // SKINCOLOR_WRISTWATCH SKINCOLOR_BURGUNDY,8, // SKINCOLOR_JET SKINCOLOR_RUBY,6, // SKINCOLOR_SAPPHIRE SKINCOLOR_CREAMSICLE,8, // SKINCOLOR_PERIWINKLE @@ -219,7 +241,7 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = SKINCOLOR_SUNSET,10, // SKINCOLOR_MOONSLAM SKINCOLOR_MAUVE,10, // SKINCOLOR_ULTRAVIOLET SKINCOLOR_DAWN,6, // SKINCOLOR_DUSK - SKINCOLOR_POPCORN,12, // SKINCOLOR_BUBBLEGUM + SKINCOLOR_CROCODILE,8, // SKINCOLOR_BUBBLEGUM SKINCOLOR_EMERALD,8, // SKINCOLOR_PURPLE SKINCOLOR_PASTEL,11, // SKINCOLOR_FUCHSIA SKINCOLOR_MAROON,8, // SKINCOLOR_TOXIC @@ -237,27 +259,33 @@ UINT8 colortranslations[MAXTRANSLATIONS][16] = { { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31}, // SKINCOLOR_GREY { 3, 5, 8, 11, 15, 17, 19, 21, 23, 24, 25, 26, 27, 29, 30, 31}, // SKINCOLOR_NICKEL { 4, 7, 11, 15, 20, 22, 24, 27, 28, 28, 28, 29, 29, 30, 30, 31}, // SKINCOLOR_BLACK + {120, 120, 0, 2, 4, 10, 16, 22, 23, 24, 25, 26, 27, 28, 29, 31}, // SKINCOLOR_SKUNK {120, 120, 121, 121, 122, 123, 10, 14, 16, 18, 20, 22, 24, 26, 28, 31}, // SKINCOLOR_FAIRY {120, 96, 97, 98, 99, 71, 32, 11, 13, 16, 18, 21, 23, 26, 28, 31}, // SKINCOLOR_POPCORN + { 97, 176, 177, 162, 163, 179, 12, 14, 16, 18, 20, 22, 24, 26, 28, 31}, // SKINCOLOR_ARTICHOKE + { 0, 208, 209, 211, 226, 202, 14, 15, 17, 19, 21, 23, 25, 27, 29, 31}, // SKINCOLOR_PIGEON { 0, 1, 3, 5, 7, 9, 34, 36, 38, 40, 42, 44, 60, 61, 62, 63}, // SKINCOLOR_SEPIA {120, 65, 67, 69, 32, 34, 36, 38, 40, 42, 44, 45, 46, 47, 62, 63}, // SKINCOLOR_BEIGE + { 3, 6, 32, 33, 35, 37, 51, 52, 54, 55, 57, 58, 60, 61, 63, 30}, // SKINCOLOR_WALNUT { 67, 70, 73, 76, 48, 49, 51, 53, 54, 56, 58, 59, 61, 63, 29, 30}, // SKINCOLOR_BROWN { 72, 76, 48, 51, 53, 55, 57, 59, 61, 63, 28, 28, 29, 29, 30, 31}, // SKINCOLOR_LEATHER {120, 120, 120, 121, 121, 122, 123, 124, 126, 127, 129, 131, 133, 135, 137, 139}, // SKINCOLOR_SALMON {120, 121, 121, 122, 144, 145, 146, 147, 148, 149, 150, 151, 134, 136, 138, 140}, // SKINCOLOR_PINK {144, 145, 146, 147, 148, 149, 150, 151, 134, 135, 136, 137, 138, 139, 140, 141}, // SKINCOLOR_ROSE { 64, 67, 70, 73, 146, 147, 148, 150, 118, 118, 119, 119, 156, 159, 141, 143}, // SKINCOLOR_BRICK + { 68, 75, 48, 50, 52, 94, 152, 136, 137, 138, 139, 140, 141, 142, 143, 31}, // SKINCOLOR_CINNAMON {120, 121, 144, 145, 147, 149, 132, 133, 134, 136, 198, 198, 199, 255, 30, 31}, // SKINCOLOR_RUBY {120, 121, 122, 123, 124, 125, 126, 127, 128, 130, 131, 134, 136, 137, 139, 140}, // SKINCOLOR_RASPBERRY {120, 65, 67, 69, 71, 124, 125, 127, 132, 133, 135, 136, 138, 139, 140, 141}, // SKINCOLOR_CHERRY {122, 123, 124, 126, 129, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142}, // SKINCOLOR_RED {123, 125, 128, 131, 133, 135, 136, 138, 140, 140, 141, 141, 142, 142, 143, 31}, // SKINCOLOR_CRIMSON {123, 124, 126, 128, 132, 135, 137, 27, 28, 28, 28, 29, 29, 30, 30, 31}, // SKINCOLOR_MAROON + {120, 96, 97, 98, 99, 65, 122, 144, 123, 124, 147, 149, 151, 153, 156, 159}, // SKINCOLOR_LEMONADE {120, 97, 112, 113, 113, 85, 87, 126, 149, 150, 151, 252, 253, 254, 255, 29}, // SKINCOLOR_FLAME { 99, 113, 113, 84, 85, 87, 126, 128, 130, 196, 197, 198, 199, 240, 243, 246}, // SKINCOLOR_SCARLET {103, 113, 113, 84, 85, 88, 127, 130, 131, 133, 134, 136, 138, 139, 141, 143}, // SKINCOLOR_KETCHUP - {120, 121, 122, 123, 124, 147, 147, 148, 90, 91, 92, 93, 94, 95, 152, 154}, // SKINCOLOR_DAWN - { 98, 112, 113, 84, 85, 87, 89, 149, 150, 251, 252, 206, 238, 240, 243, 246}, // SKINCOLOR_SUNSET + {120, 121, 122, 123, 124, 147, 148, 91, 93, 95, 152, 154, 156, 159, 141, 143}, // SKINCOLOR_DAWN + { 98, 112, 113, 84, 85, 87, 89, 149, 150, 251, 251, 205, 206, 207, 29, 31}, // SKINCOLOR_SUNSET {120, 120, 80, 80, 81, 82, 83, 83, 84, 85, 86, 88, 89, 91, 93, 95}, // SKINCOLOR_CREAMSICLE { 80, 81, 82, 83, 84, 85, 86, 88, 89, 91, 94, 95, 154, 156, 158, 159}, // SKINCOLOR_ORANGE { 82, 83, 84, 85, 87, 89, 90, 92, 94, 152, 153, 155, 157, 159, 141, 142}, // SKINCOLOR_PUMPKIN @@ -266,17 +294,19 @@ UINT8 colortranslations[MAXTRANSLATIONS][16] = { { 98, 98, 112, 112, 113, 113, 84, 85, 87, 89, 91, 93, 95, 153, 156, 159}, // SKINCOLOR_TANGERINE {120, 80, 66, 70, 72, 76, 148, 149, 150, 151, 153, 154, 156, 61, 62, 63}, // SKINCOLOR_PEACH { 64, 66, 68, 70, 72, 74, 76, 78, 48, 50, 52, 54, 56, 58, 60, 62}, // SKINCOLOR_CARAMEL - {120, 120, 96, 96, 97, 82, 84, 77, 50, 54, 57, 59, 61, 63, 29, 31}, // SKINCOLOR_CREAM - {112, 112, 112, 113, 113, 114, 114, 115, 115, 116, 116, 117, 117, 118, 118, 119}, // SKINCOLOR_GOLD + {120, 96, 96, 97, 98, 82, 84, 77, 50, 54, 57, 59, 61, 63, 29, 31}, // SKINCOLOR_CREAM + { 96, 97, 98, 112, 113, 114, 115, 116, 117, 151, 118, 119, 157, 159, 140, 143}, // SKINCOLOR_GOLD { 97, 112, 113, 113, 114, 78, 53, 252, 252, 253, 253, 254, 255, 29, 30, 31}, // SKINCOLOR_ROYAL {112, 113, 114, 115, 116, 117, 118, 119, 156, 157, 158, 159, 141, 141, 142, 143}, // SKINCOLOR_BRONZE {120, 99, 113, 114, 116, 117, 119, 61, 63, 28, 28, 29, 29, 30, 30, 31}, // SKINCOLOR_COPPER + { 96, 97, 98, 99, 104, 105, 106, 107, 117, 152, 154, 156, 159, 141, 142, 143}, // SKINCOLOR_QUARRY { 96, 97, 98, 100, 101, 102, 104, 113, 114, 115, 116, 117, 118, 119, 156, 159}, // SKINCOLOR_YELLOW { 96, 98, 99, 112, 113, 114, 114, 106, 106, 107, 107, 108, 108, 109, 110, 111}, // SKINCOLOR_MUSTARD - {105, 105, 105, 106, 106, 107, 107, 108, 108, 109, 109, 110, 110, 111, 111, 31}, // SKINCOLOR_OLIVE - {121, 144, 145, 72, 73, 84, 114, 115, 107, 108, 109, 183, 223, 207, 30, 246}, // SKINCOLOR_VOMIT + {120, 96, 97, 98, 176, 113, 114, 106, 115, 107, 108, 109, 110, 174, 175, 31}, // SKINCOLOR_CROCODILE + { 98, 101, 104, 105, 106, 115, 107, 108, 182, 109, 183, 110, 174, 111, 30, 31}, // SKINCOLOR_OLIVE + { 0, 121, 122, 144, 71, 84, 114, 115, 107, 108, 109, 183, 223, 207, 30, 246}, // SKINCOLOR_VOMIT { 98, 99, 112, 101, 113, 114, 106, 179, 180, 180, 181, 182, 183, 173, 174, 175}, // SKINCOLOR_GARDEN - { 96, 97, 99, 100, 102, 104, 160, 162, 164, 166, 168, 171, 223, 223, 207, 31}, // SKINCOLOR_LIME + {120, 96, 97, 98, 99, 176, 177, 163, 164, 166, 168, 170, 223, 207, 243, 31}, // SKINCOLOR_LIME { 98, 104, 105, 105, 106, 167, 168, 169, 170, 171, 172, 173, 174, 175, 30, 31}, // SKINCOLOR_HANDHELD {120, 120, 176, 176, 176, 177, 177, 178, 178, 179, 179, 180, 180, 181, 182, 183}, // SKINCOLOR_TEA {120, 120, 176, 176, 177, 177, 178, 179, 165, 166, 167, 168, 169, 170, 171, 172}, // SKINCOLOR_PISTACHIO @@ -289,9 +319,10 @@ UINT8 colortranslations[MAXTRANSLATIONS][16] = { {160, 184, 184, 185, 185, 186, 186, 187, 187, 188, 188, 189, 189, 190, 191, 175}, // SKINCOLOR_EMERALD {160, 184, 185, 186, 187, 188, 189, 190, 191, 191, 29, 29, 30, 30, 31, 31}, // SKINCOLOR_SWAMP {120, 120, 80, 80, 81, 177, 162, 164, 228, 228, 204, 204, 205, 205, 206, 207}, // SKINCOLOR_DREAM - {176, 160, 184, 185, 186, 187, 188, 230, 230, 206, 206, 207, 28, 29, 30, 31}, // SKINCOLOR_PLAGUE + { 97, 176, 160, 184, 185, 186, 187, 229, 229, 205, 206, 207, 28, 29, 30, 31}, // SKINCOLOR_PLAGUE {208, 209, 210, 211, 213, 220, 216, 167, 168, 188, 188, 189, 190, 191, 30, 31}, // SKINCOLOR_ALGAE - {120, 176, 177, 160, 185, 220, 216, 217, 221, 230, 206, 206, 254, 255, 29, 31}, // SKINCOLOR_CARIBBEAN + {120, 176, 177, 160, 185, 220, 216, 217, 229, 229, 204, 205, 206, 254, 255, 31}, // SKINCOLOR_CARIBBEAN + {120, 96, 97, 98, 177, 220, 216, 217, 218, 204, 252, 253, 254, 255, 30, 31}, // SKINCOLOR_AZURE {120, 208, 208, 210, 212, 214, 220, 220, 220, 221, 221, 222, 222, 223, 223, 191}, // SKINCOLOR_AQUA {210, 213, 220, 220, 220, 216, 216, 221, 221, 221, 222, 222, 223, 223, 191, 31}, // SKINCOLOR_TEAL {120, 120, 208, 208, 209, 210, 211, 212, 213, 215, 216, 217, 218, 219, 222, 223}, // SKINCOLOR_CYAN @@ -301,7 +332,9 @@ UINT8 colortranslations[MAXTRANSLATIONS][16] = { {120, 0, 0, 200, 200, 201, 11, 14, 17, 218, 222, 223, 238, 240, 243, 246}, // SKINCOLOR_PLATINUM {120, 120, 200, 200, 200, 201, 201, 201, 202, 202, 202, 203, 204, 205, 206, 207}, // SKINCOLOR_SLATE {120, 200, 200, 201, 201, 202, 202, 203, 203, 204, 204, 205, 205, 206, 207, 31}, // SKINCOLOR_STEEL + { 96, 97, 98, 112, 113, 114, 11, 203, 204, 205, 205, 237, 239, 241, 243, 246}, // SKINCOLOR_THUNDER { 64, 66, 68, 70, 32, 34, 36, 203, 204, 205, 24, 25, 26, 28, 29, 31}, // SKINCOLOR_RUST + { 81, 72, 76, 48, 51, 55, 252, 205, 205, 206, 240, 241, 242, 243, 244, 246}, // SKINCOLOR_WRISTWATCH {225, 226, 227, 228, 229, 205, 205, 206, 207, 207, 28, 28, 29, 29, 30, 31}, // SKINCOLOR_JET {208, 209, 211, 213, 215, 217, 229, 230, 232, 234, 236, 238, 240, 242, 244, 246}, // SKINCOLOR_SAPPHIRE {120, 120, 224, 225, 226, 202, 227, 228, 229, 230, 231, 233, 235, 237, 239, 241}, // SKINCOLOR_PERIWINKLE @@ -321,6 +354,7 @@ UINT8 colortranslations[MAXTRANSLATIONS][16] = { {144, 248, 249, 250, 251, 252, 253, 254, 255, 255, 29, 29, 30, 30, 31, 31}, // SKINCOLOR_BYZANTIUM {144, 145, 146, 147, 148, 149, 150, 251, 251, 252, 252, 253, 254, 255, 29, 30}, // SKINCOLOR_POMEGRANATE {120, 120, 120, 121, 121, 122, 122, 123, 192, 248, 249, 250, 251, 252, 253, 254}, // SKINCOLOR_LILAC + {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 96, 100, 104, 113, 116, 119}, // SKINCOLOR_SUPER1 {120, 120, 120, 120, 120, 120, 120, 120, 96, 98, 101, 104, 113, 115, 117, 119}, // SKINCOLOR_SUPER2 {120, 120, 120, 120, 120, 120, 96, 98, 100, 102, 104, 113, 114, 116, 117, 119}, // SKINCOLOR_SUPER3 From b2e12461d9a5d0cb51fd19322f87ec81f3c7a9ee Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Fri, 26 Apr 2019 19:26:22 -0500 Subject: [PATCH 46/51] Fix boost -> drift -> release sliptides not showing the effect when turning right --- src/k_kart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/k_kart.c b/src/k_kart.c index 79cfe8763..c6f028872 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5031,6 +5031,7 @@ static void K_KartDrift(player_t *player, boolean onground) if ((!player->kartstuff[k_sneakertimer]) || (!player->cmd.driftturn) + || (!player->kartstuff[k_aizdriftstrat]) || (player->cmd.driftturn > 0) != (player->kartstuff[k_aizdriftstrat] > 0)) { if (!player->kartstuff[k_drift]) From 359d06f1b4d4f969f367718c16457a5d6fd0c8cd Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 26 Apr 2019 22:32:31 -0400 Subject: [PATCH 47/51] Modify the first shade of Byzantium --- src/k_kart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index df65a7c9e..5eeb9a1be 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -351,7 +351,7 @@ UINT8 colortranslations[MAXTRANSLATIONS][16] = { {120, 120, 176, 176, 177, 6, 8, 10, 249, 250, 196, 197, 198, 199, 143, 31}, // SKINCOLOR_TOXIC { 96, 97, 98, 112, 113, 73, 146, 248, 249, 251, 205, 205, 206, 207, 29, 31}, // SKINCOLOR_MAUVE {121, 145, 192, 248, 249, 250, 251, 252, 252, 253, 253, 254, 254, 255, 30, 31}, // SKINCOLOR_LAVENDER - {144, 248, 249, 250, 251, 252, 253, 254, 255, 255, 29, 29, 30, 30, 31, 31}, // SKINCOLOR_BYZANTIUM + {201, 248, 249, 250, 251, 252, 253, 254, 255, 255, 29, 29, 30, 30, 31, 31}, // SKINCOLOR_BYZANTIUM {144, 145, 146, 147, 148, 149, 150, 251, 251, 252, 252, 253, 254, 255, 29, 30}, // SKINCOLOR_POMEGRANATE {120, 120, 120, 121, 121, 122, 122, 123, 192, 248, 249, 250, 251, 252, 253, 254}, // SKINCOLOR_LILAC From 3a707c093b9b587a9153fd4bf0ef496203fe626d Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Wed, 1 May 2019 23:30:53 -0400 Subject: [PATCH 48/51] Add options for adjusting deadzone, increase default deadzone from 0.25 to 0.5 --- src/d_netcmd.c | 4 ++++ src/g_game.c | 16 +++++++++++----- src/g_game.h | 8 ++++---- src/m_menu.c | 2 +- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index b605c9541..21e83d59b 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -864,6 +864,10 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_driftaxis2); CV_RegisterVar(&cv_driftaxis3); CV_RegisterVar(&cv_driftaxis4); + CV_RegisterVar(&cv_deadzone); + CV_RegisterVar(&cv_deadzone2); + CV_RegisterVar(&cv_deadzone3); + CV_RegisterVar(&cv_deadzone4); // filesrch.c CV_RegisterVar(&cv_addons_option); diff --git a/src/g_game.c b/src/g_game.c index ad25c8ce9..229cf3d47 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -406,6 +406,8 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"}, #endif #endif +static CV_PossibleValue_t deadzone_cons_t[] = {{0, "MIN"}, {FRACUNIT, "MAX"}, {0, NULL}}; + // don't mind me putting these here, I was lazy to figure out where else I could put those without blowing up the compiler. // it automatically becomes compact with 20+ players, but if you like it, I guess you can turn that on! @@ -476,6 +478,7 @@ consvar_t cv_aimaxis = {"joyaxis_aim", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, consvar_t cv_lookaxis = {"joyaxis_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_fireaxis = {"joyaxis_fire", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_driftaxis = {"joyaxis_drift", "Z-Rudder", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_deadzone = {"joy_deadzone", "0.5", CV_FLOAT|CV_SAVE, deadzone_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_turnaxis2 = {"joyaxis2_turn", "X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_moveaxis2 = {"joyaxis2_move", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -484,6 +487,7 @@ consvar_t cv_aimaxis2 = {"joyaxis2_aim", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL consvar_t cv_lookaxis2 = {"joyaxis2_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_fireaxis2 = {"joyaxis2_fire", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_driftaxis2 = {"joyaxis2_drift", "Z-Rudder", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_deadzone2 = {"joy2_deadzone", "0.5", CV_FLOAT|CV_SAVE, deadzone_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_turnaxis3 = {"joyaxis3_turn", "X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_moveaxis3 = {"joyaxis3_move", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -492,6 +496,7 @@ consvar_t cv_aimaxis3 = {"joyaxis3_aim", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL consvar_t cv_lookaxis3 = {"joyaxis3_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_fireaxis3 = {"joyaxis3_fire", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_driftaxis3 = {"joyaxis3_drift", "Z-Rudder", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_deadzone3 = {"joy3_deadzone", "0.5", CV_FLOAT|CV_SAVE, deadzone_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_turnaxis4 = {"joyaxis4_turn", "X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_moveaxis4 = {"joyaxis4_move", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -500,6 +505,7 @@ consvar_t cv_aimaxis4 = {"joyaxis4_aim", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL consvar_t cv_lookaxis4 = {"joyaxis4_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_fireaxis4 = {"joyaxis4_fire", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_driftaxis4 = {"joyaxis4_drift", "Z-Rudder", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_deadzone4 = {"joy4_deadzone", "0.5", CV_FLOAT|CV_SAVE, deadzone_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; #if MAXPLAYERS > 16 @@ -925,8 +931,8 @@ static INT32 Joy1Axis(axis_input_e axissel) retaxis = +JOYAXISRANGE; if (!Joystick.bGamepadStyle && axissel < AXISDEAD) { - const INT32 jdeadzone = JOYAXISRANGE/4; - if (-jdeadzone < retaxis && retaxis < jdeadzone) + const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_deadzone.value) >> FRACBITS; + if (abs(retaxis) <= jdeadzone) return 0; } if (flp) retaxis = -retaxis; //flip it around @@ -1006,7 +1012,7 @@ static INT32 Joy2Axis(axis_input_e axissel) retaxis = +JOYAXISRANGE; if (!Joystick2.bGamepadStyle && axissel < AXISDEAD) { - const INT32 jdeadzone = JOYAXISRANGE/4; + const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_deadzone2.value) >> FRACBITS; if (-jdeadzone < retaxis && retaxis < jdeadzone) return 0; } @@ -1087,7 +1093,7 @@ static INT32 Joy3Axis(axis_input_e axissel) retaxis = +JOYAXISRANGE; if (!Joystick3.bGamepadStyle && axissel < AXISDEAD) { - const INT32 jdeadzone = JOYAXISRANGE/4; + const INT32 jdeadzone = jdeadzone = ((JOYAXISRANGE-1) * cv_deadzone3.value) >> FRACBITS; if (-jdeadzone < retaxis && retaxis < jdeadzone) return 0; } @@ -1167,7 +1173,7 @@ static INT32 Joy4Axis(axis_input_e axissel) retaxis = +JOYAXISRANGE; if (!Joystick4.bGamepadStyle && axissel < AXISDEAD) { - const INT32 jdeadzone = JOYAXISRANGE/4; + const INT32 jdeadzone = jdeadzone = ((JOYAXISRANGE-1) * cv_deadzone4.value) >> FRACBITS; if (-jdeadzone < retaxis && retaxis < jdeadzone) return 0; } diff --git a/src/g_game.h b/src/g_game.h index eea149c98..9681491b7 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -62,10 +62,10 @@ extern consvar_t cv_invertmouse/*, cv_alwaysfreelook, cv_chasefreelook, cv_mouse extern consvar_t cv_invertmouse2/*, cv_alwaysfreelook2, cv_chasefreelook2, cv_mousemove2*/; extern consvar_t cv_useranalog, cv_useranalog2, cv_useranalog3, cv_useranalog4; extern consvar_t cv_analog, cv_analog2, cv_analog3, cv_analog4; -extern consvar_t cv_turnaxis,cv_moveaxis,cv_brakeaxis,cv_aimaxis,cv_lookaxis,cv_fireaxis,cv_driftaxis; -extern consvar_t cv_turnaxis2,cv_moveaxis2,cv_brakeaxis2,cv_aimaxis2,cv_lookaxis2,cv_fireaxis2,cv_driftaxis2; -extern consvar_t cv_turnaxis3,cv_moveaxis3,cv_brakeaxis3,cv_aimaxis3,cv_lookaxis3,cv_fireaxis3,cv_driftaxis3; -extern consvar_t cv_turnaxis4,cv_moveaxis4,cv_brakeaxis4,cv_aimaxis4,cv_lookaxis4,cv_fireaxis4,cv_driftaxis4; +extern consvar_t cv_turnaxis,cv_moveaxis,cv_brakeaxis,cv_aimaxis,cv_lookaxis,cv_fireaxis,cv_driftaxis,cv_deadzone; +extern consvar_t cv_turnaxis2,cv_moveaxis2,cv_brakeaxis2,cv_aimaxis2,cv_lookaxis2,cv_fireaxis2,cv_driftaxis2,cv_deadzone2; +extern consvar_t cv_turnaxis3,cv_moveaxis3,cv_brakeaxis3,cv_aimaxis3,cv_lookaxis3,cv_fireaxis3,cv_driftaxis3,cv_deadzone3; +extern consvar_t cv_turnaxis4,cv_moveaxis4,cv_brakeaxis4,cv_aimaxis4,cv_lookaxis4,cv_fireaxis4,cv_driftaxis4,cv_deadzone4; extern consvar_t cv_ghost_besttime, cv_ghost_bestlap, cv_ghost_last, cv_ghost_guest, cv_ghost_staff; typedef enum diff --git a/src/m_menu.c b/src/m_menu.c index fefafff31..a5b21b768 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2493,7 +2493,7 @@ boolean M_Responder(event_t *ev) { if (ev->type == ev_joystick && ev->data1 == 0 && joywait < I_GetTime()) { - const INT32 jdeadzone = JOYAXISRANGE/4; + const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_deadzone.value) >> FRACBITS; if (ev->data3 != INT32_MAX) { if (Joystick.bGamepadStyle || abs(ev->data3) > jdeadzone) From 889ead7840408b378ac512901c4f52b01ddf3ad1 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 2 May 2019 00:44:04 -0400 Subject: [PATCH 49/51] Fix wheel animations --- src/g_game.c | 2 +- src/k_kart.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index ad25c8ce9..713eecac1 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -5283,7 +5283,7 @@ void G_ReadMetalTic(mobj_t *metal) speed = FixedDiv(P_AproxDistance(oldmetal.momx, oldmetal.momy), metal->scale)>>FRACBITS; // Use speed to decide an appropriate state - if (speed > 28) // default skin runspeed + if (speed > 20) // default skin runspeed statetype = 2; else if (speed > 1) // stopspeed statetype = 1; diff --git a/src/k_kart.c b/src/k_kart.c index c6f028872..8d1e9373a 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1634,7 +1634,7 @@ void K_KartMoveAnimation(player_t *player) P_SetPlayerMobjState(player->mo, S_KART_DRIFT1_R); } // Run frames - S_KART_RUN1 S_KART_RUN1_L S_KART_RUN1_R - else if (player->speed > FixedMul(player->runspeed, player->mo->scale)) + else if (player->speed > (20*player->mo->scale)) { if (cmd->driftturn < 0 && !(player->mo->state >= &states[S_KART_RUN1_R] && player->mo->state <= &states[S_KART_RUN2_R])) P_SetPlayerMobjState(player->mo, S_KART_RUN1_R); @@ -1644,7 +1644,7 @@ void K_KartMoveAnimation(player_t *player) P_SetPlayerMobjState(player->mo, S_KART_RUN1); } // Walk frames - S_KART_WALK1 S_KART_WALK1_L S_KART_WALK1_R - else if (player->speed <= FixedMul(player->runspeed, player->mo->scale)) + else if (player->speed <= (20*player->mo->scale)) { if (cmd->driftturn < 0 && !(player->mo->state >= &states[S_KART_WALK1_R] && player->mo->state <= &states[S_KART_WALK2_R])) P_SetPlayerMobjState(player->mo, S_KART_WALK1_R); From 2d9ae1abfd3aadff827e5e1e3e92f4ca627cf922 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 2 May 2019 02:13:44 -0400 Subject: [PATCH 50/51] Dumbass typo --- src/g_game.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 229cf3d47..bfe49fc1a 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1093,7 +1093,7 @@ static INT32 Joy3Axis(axis_input_e axissel) retaxis = +JOYAXISRANGE; if (!Joystick3.bGamepadStyle && axissel < AXISDEAD) { - const INT32 jdeadzone = jdeadzone = ((JOYAXISRANGE-1) * cv_deadzone3.value) >> FRACBITS; + const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_deadzone3.value) >> FRACBITS; if (-jdeadzone < retaxis && retaxis < jdeadzone) return 0; } @@ -1173,7 +1173,7 @@ static INT32 Joy4Axis(axis_input_e axissel) retaxis = +JOYAXISRANGE; if (!Joystick4.bGamepadStyle && axissel < AXISDEAD) { - const INT32 jdeadzone = jdeadzone = ((JOYAXISRANGE-1) * cv_deadzone4.value) >> FRACBITS; + const INT32 jdeadzone = ((JOYAXISRANGE-1) * cv_deadzone4.value) >> FRACBITS; if (-jdeadzone < retaxis && retaxis < jdeadzone) return 0; } From e954f0b410a09451dc03a1c772061c4537e658e5 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 2 May 2019 02:52:22 -0400 Subject: [PATCH 51/51] Missed a spot --- src/k_kart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index 8d1e9373a..d8028f08a 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -8291,7 +8291,7 @@ static void K_drawKartFirstPerson(void) } { - if (stplyr->speed < FixedMul(stplyr->runspeed, stplyr->mo->scale) && (leveltime & 1) && !splitscreen) + if (stplyr->speed < (20*stplyr->mo->scale) && (leveltime & 1) && !splitscreen) y++; // the following isn't EXPLICITLY right, it just gets the result we want, but i'm too lazy to look up the right way to do it if (stplyr->mo->flags2 & MF2_SHADOW)