Merge branch 'master' into qzdoom-merge

This commit is contained in:
Rachael Alexanderson 2017-07-19 17:32:41 -04:00
commit 77617a2757
8 changed files with 20 additions and 8 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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");

View File

@ -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();
}

View File

@ -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.)

View File

@ -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);

View File

@ -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;

View File

@ -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