From f4672d67bcac01f103f2dd3275d4ef2a65cb5f11 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 19 Jul 2017 13:24:19 +0300 Subject: [PATCH 1/4] Fixed crash when drawing untranslated font https://forum.zdoom.org/viewtopic.php?t=57268 --- src/v_font.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/v_font.cpp b/src/v_font.cpp index f133b1be4..1f5c12c9c 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -381,6 +381,7 @@ FFont::FFont (const char *name, const char *nametemplate, int first, int count, Next = FirstFont; FirstFont = this; Cursor = '_'; + ActiveColors = 0; maxyoffs = 0; From bbb8374b061a5adda494d43e1e4b2374b7dd9bf6 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 19 Jul 2017 15:00:55 +0300 Subject: [PATCH 2/4] Fixed applying of color to untranslated fonts in hardware renderer https://forum.zdoom.org/viewtopic.php?t=57268 --- src/gl/renderer/gl_2ddrawer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl/renderer/gl_2ddrawer.cpp b/src/gl/renderer/gl_2ddrawer.cpp index 0e08073cc..130b6931a 100644 --- a/src/gl/renderer/gl_2ddrawer.cpp +++ b/src/gl/renderer/gl_2ddrawer.cpp @@ -133,14 +133,14 @@ void F2DDrawer::AddTexture(FTexture *img, DrawParms &parms) if (parms.style.Flags & STYLEF_ColorIsFixed) { color = parms.fillcolor; - std::swap(color.r, color.b); } else { color = PalEntry(light, light, light); } color.a = (uint8_t)(parms.Alpha * 255); - color = PalEntry((color.a * parms.color.a) / 255, (color.r * parms.color.r) / 255, (color.g * parms.color.g) / 255, (color.b * parms.color.b) / 255); + // red and blue channels are swapped to use value as vertex color + color = PalEntry((color.a * parms.color.a) / 255, (color.b * parms.color.b) / 255, (color.g * parms.color.g) / 255, (color.r * parms.color.r) / 255); // scissor test doesn't use the current viewport for the coordinates, so use real screen coordinates dg.mScissor[0] = GLRenderer->ScreenToWindowX(parms.lclip); From 62a4eb6b6d15fce3bc537db75e6d236428b60a90 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 19 Jul 2017 11:04:53 -0400 Subject: [PATCH 3/4] - fixed a comment in version.h about the current ZScript version (it was out of date) --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index 11158099d..080385839 100644 --- a/src/version.h +++ b/src/version.h @@ -55,7 +55,7 @@ const char *GetVersionString(); #define RC_FILEVERSION 3,1,9999,0 #define RC_PRODUCTVERSION 3,1,9999,0 #define RC_PRODUCTVERSION2 VERSIONSTR -// These are for content versioning. The current state is '2.4'. +// These are for content versioning. The current state is '3.2'. #define VER_MAJOR 3 #define VER_MINOR 2 #define VER_REVISION 0 From 5918167fb355423ecd3530009477a31d9d5e0aaa Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 19 Jul 2017 15:02:46 -0400 Subject: [PATCH 4/4] - added 'kill baddies' cheat - does the same thing as 'kill monsters' only it ignores friendly monsters --- src/d_protocol.h | 3 ++- src/m_cheat.cpp | 3 ++- src/p_enemy.cpp | 4 ++-- src/p_enemy.h | 2 +- src/p_interaction.cpp | 9 +++++++++ 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/d_protocol.h b/src/d_protocol.h index a05cef29e..f5bcf10fb 100644 --- a/src/d_protocol.h +++ b/src/d_protocol.h @@ -219,7 +219,8 @@ enum ECheatCommand CHT_BUDDHA, CHT_NOCLIP2, CHT_BUDDHA2, - CHT_GOD2 + CHT_GOD2, + CHT_MASSACRE2 }; void StartChunk (int id, uint8_t **stream); diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index d1dd91e65..aa7038fb1 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -321,8 +321,9 @@ void cht_DoCheat (player_t *player, int cheat) break; case CHT_MASSACRE: + case CHT_MASSACRE2: { - int killcount = P_Massacre (); + int killcount = P_Massacre (cheat == CHT_MASSACRE2); // killough 3/22/98: make more intelligent about plural // Ty 03/27/98 - string(s) *not* externalized mysnprintf (msgbuild, countof(msgbuild), "%d Monster%s Killed", killcount, killcount==1 ? "" : "s"); diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 076e5772a..047b59924 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -3592,7 +3592,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BossDeath) // //---------------------------------------------------------------------------- -int P_Massacre () +int P_Massacre (bool baddies) { // jff 02/01/98 'em' cheat - kill all monsters // partially taken from Chi's .46 port @@ -3606,7 +3606,7 @@ int P_Massacre () while ( (actor = iterator.Next ()) ) { - if (!(actor->flags2 & MF2_DORMANT) && (actor->flags3 & MF3_ISMONSTER)) + if (!(actor->flags2 & MF2_DORMANT) && (actor->flags3 & MF3_ISMONSTER) && (!baddies || !(actor->flags & MF_FRIENDLY))) { killcount += actor->Massacre(); } diff --git a/src/p_enemy.h b/src/p_enemy.h index a0e829c71..bdc044c5c 100644 --- a/src/p_enemy.h +++ b/src/p_enemy.h @@ -68,7 +68,7 @@ void A_FaceTarget(AActor *actor); void A_Face(AActor *self, AActor *other, DAngle max_turn = 0., DAngle max_pitch = 270., DAngle ang_offset = 0., DAngle pitch_offset = 0., int flags = 0, double z_add = 0); bool CheckBossDeath (AActor *); -int P_Massacre (); +int P_Massacre (bool baddies = false); bool P_CheckMissileRange (AActor *actor); #define SKULLSPEED (20.) diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index f9c027c35..a241647d9 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1966,6 +1966,15 @@ CCMD (kill) Net_WriteByte (DEM_GENERICCHEAT); Net_WriteByte (CHT_MASSACRE); } + else if (!stricmp (argv[1], "baddies")) + { + // Kill all the unfriendly monsters + if (CheckCheatmode ()) + return; + + Net_WriteByte (DEM_GENERICCHEAT); + Net_WriteByte (CHT_MASSACRE2); + } else { Net_WriteByte (DEM_KILLCLASSCHEAT);