From 10c312f55ce3a99f9cb027d6398d235982e6fc8d Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Fri, 13 Dec 2013 02:51:15 -0500 Subject: [PATCH 1/5] - Silence GCC PCD_PRINTBINARY warning since we've been able to since GCC 4.6. --- src/p_acs.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 32a70cd15..582385c48 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -6796,7 +6796,18 @@ scriptwait: break; case PCD_PRINTBINARY: +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 6))) +#define HAS_DIAGNOSTIC_PRAGMA +#endif +#ifdef HAS_DIAGNOSTIC_PRAGMA +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat=" +#pragma GCC diagnostic ignored "-Wformat-extra-args" +#endif work.AppendFormat ("%B", STACK(1)); +#ifdef HAS_DIAGNOSTIC_PRAGMA +#pragma GCC diagnostic pop +#endif --sp; break; From 12d45bbc33ed833b1d30f7180e5d3dcca1a0f21e Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Fri, 13 Dec 2013 03:00:35 -0500 Subject: [PATCH 2/5] - Use setenv for LC_NUMERIC since setlocale gets reset by the libraries on some systems. --- src/sdl/i_main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp index 65b992f6a..1736305d8 100644 --- a/src/sdl/i_main.cpp +++ b/src/sdl/i_main.cpp @@ -257,7 +257,12 @@ int main (int argc, char **argv) #if defined(__MACH__) && !defined(NOASM) unprotect_rtext(); #endif - + + // Set LC_NUMERIC environment variable in case some library decides to + // clear the setlocale call at least this will be correct. + // Note that the LANG environment variable is overridden by LC_* + setenv ("LC_NUMERIC", "C", 1); + #ifndef NO_GTK GtkAvailable = gtk_init_check (&argc, &argv); #endif From a993b0288a0364eafe79c229af162dfc061cc717 Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Mon, 16 Dec 2013 23:02:27 +1300 Subject: [PATCH 3/5] Stop prediction from playing and stopping sounds Player prediction would play *jump and stop falling sounds, creating odd cases of sound repetition before the gametic caught up. --- src/p_user.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/p_user.cpp b/src/p_user.cpp index 938c7727f..14fa9c12c 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -2473,9 +2473,10 @@ void P_PlayerThink (player_t *player) if ( player->cheats & CF_HIGHJUMP ) jumpvelz *= 2; player->mo->velz += jumpvelz; - S_Sound (player->mo, CHAN_BODY, "*jump", 1, ATTN_NORM); player->mo->flags2 &= ~MF2_ONMOBJ; player->jumpTics = -1; + if (!(player->cheats & CF_PREDICTING)) + S_Sound(player->mo, CHAN_BODY, "*jump", 1, ATTN_NORM); } } @@ -2502,7 +2503,7 @@ void P_PlayerThink (player_t *player) { player->mo->flags2 |= MF2_FLY; player->mo->flags |= MF_NOGRAVITY; - if (player->mo->velz <= -39*FRACUNIT) + if ((player->mo->velz <= -39 * FRACUNIT) && !(player->cheats & CF_PREDICTING)) { // Stop falling scream S_StopSound (player->mo, CHAN_VOICE); } From ae49044f96e39965b37f4f8ab4562fec130c9d84 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 19 Dec 2013 17:59:58 +0100 Subject: [PATCH 4/5] - let 'showloadtimes' measure UDMF parsing. --- src/p_setup.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 3693e9f7e..315da4ffc 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -3754,7 +3754,9 @@ void P_SetupLevel (char *lumpname, int position) } else { + times[0].Clock(); P_ParseTextMap(map, missingtex); + times[0].Unclock(); } times[6].Clock(); From 6e0f885135b4e562c0355b08aa52ef1a034dcf9f Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 25 Dec 2013 22:30:47 +0100 Subject: [PATCH 5/5] - fixed: The 3D floor setup code treated alphas larger than 255 as translucent. This was causing problems with ZDCMP2 in GZDoom --- src/p_3dfloors.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index 51ac24229..95ced549a 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -293,8 +293,9 @@ static int P_Set3DFloor(line_t * line, int param, int param2, int alpha) FTextureID tex = line->sidedef[0]->GetTexture(side_t::top); if (!tex.Exists() && alpha<255) { - alpha=clamp(-tex.GetIndex(), 0, 255); + alpha = -tex.GetIndex(); } + alpha = clamp(alpha, 0, 255); if (alpha==0) flags&=~(FF_RENDERALL|FF_BOTHPLANES|FF_ALLSIDES); else if (alpha!=255) flags|=FF_TRANSLUCENT;