Skip to content

Commit

Permalink
Hexen|Fixed: Disallow warp cheat when the player is dead
Browse files Browse the repository at this point in the history
Warping while dead would turn the player into an undead zombie.
  • Loading branch information
skyjake committed Apr 30, 2012
1 parent f4d4dc3 commit 90a6580
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doomsday/plugins/jhexen/src/m_cheat.c
Expand Up @@ -374,6 +374,12 @@ int Cht_WarpFunc(const int* args, int player)
if(IS_NETGAME)
return false;

if(G_GameState() == GS_MAP && plr->playerState == PST_DEAD)
{
Con_Message("Cannot warp while dead.\n");
return false;
}

tens = args[0] - '0';
ones = args[1] - '0';
if(tens < 0 || tens > 9 || ones < 0 || ones > 9)
Expand Down

0 comments on commit 90a6580

Please sign in to comment.