mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 00:21:35 +00:00
- added 'kill baddies' cheat - does the same thing as 'kill monsters' only it ignores friendly monsters
This commit is contained in:
parent
62a4eb6b6d
commit
5918167fb3
5 changed files with 16 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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.)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue