Skip to content

Commit

Permalink
Fixed Heretic: ccmd warp did not work until after the first game had …
Browse files Browse the repository at this point in the history
…been started.
  • Loading branch information
danij-deng committed Mar 22, 2010
1 parent 433f4cb commit 6305dc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/g_game.c
Expand Up @@ -191,7 +191,7 @@ boolean respawnMonsters;

boolean paused;
boolean sendPause; // Send a pause event next tic.
boolean userGame; // Ok to save / end game.
boolean userGame = false; // Ok to save / end game.
boolean deathmatch; // Only if started as net death.
player_t players[MAXPLAYERS];

Expand Down
17 changes: 6 additions & 11 deletions doomsday/plugins/jheretic/src/m_cheat.c
Expand Up @@ -167,15 +167,7 @@ static unsigned char cheatAutomapSeq[] = {

static boolean cheatsEnabled(void)
{
if(IS_NETGAME && !IS_CLIENT && netSvAllowCheats)
return true;

#ifdef _DEBUG
return true;
#else
return !(gameSkill == SM_NIGHTMARE || (IS_NETGAME /*&& !netcheat */ )
|| players[CONSOLEPLAYER].health <= 0);
#endif
return !IS_NETGAME;
}

void Cht_Init(void)
Expand Down Expand Up @@ -845,7 +837,7 @@ DEFCC(CCmdCheatGive)
return true;
}

if(!cheatsEnabled())
if(IS_NETGAME && !netSvAllowCheats)
return false;

if(argc != 2 && argc != 3)
Expand Down Expand Up @@ -1104,7 +1096,10 @@ DEFCC(CCmdCheatLeaveMap)

DEFCC(CCmdCheatPig)
{
if(!cheatsEnabled())
if(IS_NETGAME)
return false;

if(!userGame || gameSkill == SM_NIGHTMARE || players[CONSOLEPLAYER].health <= 0)
return false;

Cht_ChickenFunc(NULL, CONSOLEPLAYER);
Expand Down

0 comments on commit 6305dc4

Please sign in to comment.