Skip to content

Commit

Permalink
Fixed BUG #1374907 Respawn command-line flag (-respawn) is broken.
Browse files Browse the repository at this point in the history
  • Loading branch information
danij committed Aug 18, 2006
1 parent 83a1b87 commit 5816cff
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions doomsday/plugins/common/src/d_net.c
Expand Up @@ -144,9 +144,9 @@ int D_NetServerStarted(int before)
cfg.jumpEnabled = cfg.netJumping;

#if __JDOOM__
respawnparm = cfg.netRespawn;
respawnmonsters = cfg.netRespawn;
#elif __JHERETIC__
respawnparm = cfg.netRespawn;
respawnmonsters = cfg.netRespawn;
#elif __JHEXEN__
randomclass = cfg.netRandomclass;
#endif
Expand Down Expand Up @@ -406,7 +406,7 @@ int D_NetWorldEvent(int type, int parm, void *data)
deathmatch = false;
nomonsters = false;
#if __JDOOM__ || __JHERETIC__
respawnparm = false;
respawnmonsters = false;
#endif

#if __JHEXEN__
Expand Down Expand Up @@ -707,7 +707,7 @@ DEFCC(CCmdSetMap)
cfg.jumpEnabled = cfg.netJumping;

#if __JDOOM__ || __JHERETIC__
respawnparm = cfg.netRespawn;
respawnmonsters = cfg.netRespawn;
ep = atoi(argv[1]);
map = atoi(argv[2]);
#elif __JSTRIFE__
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/src/d_netcl.c
Expand Up @@ -157,7 +157,7 @@ void NetCl_UpdateGameState(byte *data)

deathmatch = gsDeathmatch;
nomonsters = !gsMonsters;
respawnparm = gsRespawn;
respawnmonsters = gsRespawn;

// Some statistics.
#if __JHEXEN__ || __JSTRIFE__
Expand All @@ -171,7 +171,7 @@ void NetCl_UpdateGameState(byte *data)
2 ? "Deathmatch2" : "Co-op");
#endif
Con_Message(" Respawn=%s Monsters=%s Jumping=%s Gravity=%.1f\n",
respawnparm ? "yes" : "no", !nomonsters ? "yes" : "no",
respawnmonsters ? "yes" : "no", !nomonsters ? "yes" : "no",
gsJumping ? "yes" : "no", FIX2FLT(gsGravity));

#ifdef __JHERETIC__
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/src/d_netsv.c
Expand Up @@ -138,7 +138,7 @@ void NetSv_UpdateGameConfig(void)

if(nomonsters)
strcat(gameConfigString, " nomonst");
if(respawnparm)
if(respawnmonsters)
strcat(gameConfigString, " respawn");

if(cfg.jumpEnabled)
Expand Down Expand Up @@ -808,7 +808,7 @@ void NetSv_SendGameState(int flags, int to)
ptr[3] = gamemap;
ptr[4] = (deathmatch & 0x3)
| (!nomonsters? 0x4 : 0)
| (respawnparm? 0x8 : 0)
| (respawnmonsters? 0x8 : 0)
| (cfg.jumpEnabled? 0x10 : 0)
#if __JDOOM__ || __JHERETIC__
| (gameskill << 5);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/g_game.c
Expand Up @@ -1789,7 +1789,7 @@ void G_DoNewGame(void)
if(!IS_NETGAME)
{
deathmatch = false;
respawnparm = false;
respawnmonsters = false;
nomonsters = ArgExists("-nomonsters"); //false;
}
G_InitNew(d_skill, d_episode, d_map);
Expand Down
8 changes: 4 additions & 4 deletions doomsday/plugins/common/src/p_saveg.c
Expand Up @@ -2394,7 +2394,7 @@ int SV_SaveGame(char *filename, char *description)
hdr.map = gamemap;
hdr.deathmatch = deathmatch;
hdr.nomonsters = nomonsters;
hdr.respawn = respawnparm;
hdr.respawn = respawnmonsters;
hdr.leveltime = leveltime;
hdr.gameid = SV_GameID();
for(i = 0; i < MAXPLAYERS; i++)
Expand Down Expand Up @@ -2501,7 +2501,7 @@ int SV_LoadGame(char *filename)
gamemap = hdr.map;
deathmatch = hdr.deathmatch;
nomonsters = hdr.nomonsters;
respawnparm = hdr.respawn;
respawnmonsters = hdr.respawn;
// We don't have the right to say which players are in the game. The
// players that already are will continue to be. If the data for a given
// player is not in the savegame file, he will be notified. The data for
Expand Down Expand Up @@ -2607,7 +2607,7 @@ void SV_SaveClient(unsigned int gameid)
hdr.map = gamemap;
hdr.deathmatch = deathmatch;
hdr.nomonsters = nomonsters;
hdr.respawn = respawnparm;
hdr.respawn = respawnmonsters;
hdr.leveltime = leveltime;
hdr.gameid = gameid;
SV_Write(&hdr, sizeof(hdr));
Expand Down Expand Up @@ -2661,7 +2661,7 @@ void SV_LoadClient(unsigned int gameid)
gameskill = hdr.skill;
deathmatch = hdr.deathmatch;
nomonsters = hdr.nomonsters;
respawnparm = hdr.respawn;
respawnmonsters = hdr.respawn;
// Do we need to change the map?
if(gamemap != hdr.map || gameepisode != hdr.episode)
{
Expand Down

0 comments on commit 5816cff

Please sign in to comment.