From 5b369ad21ec4d04cd622ef9987eeb24522c73684 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Tue, 5 Mar 2019 19:04:15 -0500 Subject: [PATCH 01/37] 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 02/37] 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 d22601e97925c97fc4dcdfce6eeede65012f878a Mon Sep 17 00:00:00 2001 From: fickleheart Date: Sun, 24 Mar 2019 17:31:04 -0500 Subject: [PATCH 03/37] 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 04/37] 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 05/37] 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 06/37] 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 07/37] 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 08/37] 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 09/37] 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 10/37] 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 11/37] 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 12/37] 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 13/37] 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 14/37] 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 15/37] 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 16/37] 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 17/37] 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 18/37] 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 19/37] 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 20/37] 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 21/37] 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 22/37] 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 23/37] 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 24/37] 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 25/37] 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 26/37] 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 27/37] 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 28/37] 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 29/37] 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 3e838c1e831d363c953692b73ab643cf3ba61083 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Mon, 22 Apr 2019 00:29:47 -0400 Subject: [PATCH 30/37] 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 31/37] 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 32/37] 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 33/37] 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 34/37] 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 35/37] 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 36/37] 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 b2e12461d9a5d0cb51fd19322f87ec81f3c7a9ee Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Fri, 26 Apr 2019 19:26:22 -0500 Subject: [PATCH 37/37] 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])