From 7843ece01a896c03bd947f7e612632e6379ea6cb Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Mon, 11 Jan 2016 15:08:38 -0600 Subject: [PATCH 1/3] Fixed: Friendly fire damage didn't take LAXTELEFRAGDMG into account. --- src/p_interaction.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 240a77378..5534fb14a 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1045,7 +1045,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage, return -1; } - if ((rawdamage < TELEFRAG_DAMAGE) || (target->flags7 & MF7_LAXTELEFRAGDMG)) // TELEFRAG_DAMAGE may only be reduced with NOTELEFRAGPIERCE or it may not guarantee its effect. + if ((rawdamage < TELEFRAG_DAMAGE) || (target->flags7 & MF7_LAXTELEFRAGDMG)) // TELEFRAG_DAMAGE may only be reduced with LAXTELEFRAGDMG or it may not guarantee its effect. { if (player && damage > 1) { @@ -1221,7 +1221,8 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage, ((player && player != source->player) || (!player && target != source)) && target->IsTeammate (source)) { - if (rawdamage < TELEFRAG_DAMAGE) //Use the original damage to check for telefrag amount. Don't let the now-amplified damagetypes do it. + //Use the original damage to check for telefrag amount. Don't let the now-amplified damagetypes do it. + if (rawdamage < TELEFRAG_DAMAGE || (target->flags7 & MF7_LAXTELEFRAGDMG)) { // Still allow telefragging :-( damage = (int)((float)damage * level.teamdamage); if (damage < 0) From cd9e18a72b0718f41d168d30b0ca03efddd36989 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 11 Jan 2016 23:44:13 +0100 Subject: [PATCH 2/3] - fixed: operator<< (FArchive &arc, secspecial_t &p) erroneously read the old special in the compatibility handler as a short, but it must be read as an int. - bumped savegame version to bring it in line with a GZDoom exclusive change. --- src/p_sectors.cpp | 2 +- src/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_sectors.cpp b/src/p_sectors.cpp index 5a60933ba..6c5c08a56 100644 --- a/src/p_sectors.cpp +++ b/src/p_sectors.cpp @@ -883,7 +883,7 @@ FArchive &operator<< (FArchive &arc, secspecial_t &p) { if (SaveVersion < 4529) { - short special; + int special; arc << special; sector_t sec; P_InitSectorSpecial(&sec, special, true); diff --git a/src/version.h b/src/version.h index 6a0eb9c4b..b8c4facb0 100644 --- a/src/version.h +++ b/src/version.h @@ -76,7 +76,7 @@ const char *GetVersionString(); // Use 4500 as the base git save version, since it's higher than the // SVN revision ever got. -#define SAVEVER 4530 +#define SAVEVER 4531 #define SAVEVERSTRINGIFY2(x) #x #define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x) From 61e48013dcd922d51a61838c04a0c5ed2b307661 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 11 Jan 2016 23:46:12 +0100 Subject: [PATCH 3/3] - fixed a warning in WildMidi code. --- src/wildmidi/wildmidi_lib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wildmidi/wildmidi_lib.cpp b/src/wildmidi/wildmidi_lib.cpp index 0a527ec2a..20857da12 100644 --- a/src/wildmidi/wildmidi_lib.cpp +++ b/src/wildmidi/wildmidi_lib.cpp @@ -573,7 +573,7 @@ static inline int wm_isdigit(int c) { #define TOKEN_CNT_INC 8 static char** WM_LC_Tokenize_Line(char *line_data) { - int line_length = strlen(line_data); + int line_length = (int)strlen(line_data); int token_data_length = 0; int line_ofs = 0; int token_start = 0;