Skip to content

Commit

Permalink
libdoom: Handle the 'kill' command as a cheat in multiplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jul 25, 2013
1 parent eaa1854 commit 27b0609
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 1 addition & 2 deletions doomsday/plugins/common/src/d_netsv.c
Expand Up @@ -1325,11 +1325,10 @@ void NetSv_ExecuteCheat(int player, char const *command)
if(!strnicmp(command, "god", 3)
|| !strnicmp(command, "noclip", 6)
|| !strnicmp(command, "give", 4)
#ifdef __JHERETIC__
|| !strnicmp(command, "kill", 4)
#ifdef __JHERETIC__
|| !strnicmp(command, "chicken", 7)
#elif __JHEXEN__
|| !strnicmp(command, "kill", 4)
|| !strnicmp(command, "class", 5)
|| !strnicmp(command, "pig", 3)
|| !strnicmp(command, "runscript", 9)
Expand Down
16 changes: 15 additions & 1 deletion doomsday/plugins/doom/src/m_cheat.c
Expand Up @@ -646,7 +646,21 @@ D_CMD(CheatGive)

D_CMD(CheatMassacre)
{
Con_Printf("%i monsters killed.\n", P_Massacre());
if(G_GameState() == GS_MAP)
{
if(IS_CLIENT)
{
NetCl_CheatRequest("kill");
}
else if((IS_NETGAME && !netSvAllowCheats) || gameSkill == SM_NIGHTMARE)
{
return false;
}
else
{
Con_Printf("%i monsters killed.\n", P_Massacre());
}
}
return true;
}

Expand Down

0 comments on commit 27b0609

Please sign in to comment.