- Added a modified version of Karate Chris's submission for killing specific
monsters with the 'Kill' ccmd. SVN r759 (trunk)
This commit is contained in:
parent
77040032c5
commit
d412266bfc
5 changed files with 33 additions and 3 deletions
|
|
@ -2336,6 +2336,27 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
}
|
||||
break;
|
||||
|
||||
case DEM_KILLCLASSCHEAT:
|
||||
{
|
||||
AActor *actor;
|
||||
TThinkerIterator<AActor> iterator;
|
||||
|
||||
char *classname = ReadString (stream);
|
||||
int killcount = 0;
|
||||
|
||||
while ( (actor = iterator.Next ()) )
|
||||
{
|
||||
if (!stricmp (actor->GetClass ()->TypeName.GetChars (), classname))
|
||||
{
|
||||
if (!(actor->flags2 & MF2_DORMANT) && (actor->flags3 & MF3_ISMONSTER))
|
||||
killcount += actor->Massacre ();
|
||||
}
|
||||
}
|
||||
|
||||
Printf ("Killed %d monsters of type %s.\n",killcount, classname);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
I_Error ("Unknown net command: %d", type);
|
||||
break;
|
||||
|
|
@ -2372,6 +2393,7 @@ void Net_SkipCommand (int type, BYTE **stream)
|
|||
case DEM_SUMMONFOE:
|
||||
case DEM_SPRAY:
|
||||
case DEM_MORPHEX:
|
||||
case DEM_KILLCLASSCHEAT:
|
||||
skip = strlen ((char *)(*stream)) + 1;
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue