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/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); 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 abd6508ed..d44d3e444 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -3595,7 +3595,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 @@ -3609,7 +3609,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 8329faea0..1b3e0f028 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1979,6 +1979,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); 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; 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