Skip to content

Commit

Permalink
Doom|Fixed: Disabled malfunctioning "server-game-coop-nothing"
Browse files Browse the repository at this point in the history
Setting this variable to 1 caused the server to have a fatal error when
a player entered, as it prevented the spawning of any mobjs whatsoever.

Todo for later: Figure out which objects are considered to be "multiplayer only"

Bug report: http://sourceforge.net/tracker/?func=detail&atid=542099&aid=3508745&group_id=74815
  • Loading branch information
skyjake committed Mar 19, 2012
1 parent 4104779 commit 5a492f5
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doomsday/plugins/jdoom/include/d_config.h
Expand Up @@ -138,7 +138,7 @@ typedef struct jdoom_config_s {
byte noCoopDamage;
byte noTeamDamage;
byte noCoopWeapons;
byte noCoopAnything;
byte noCoopAnything; // disable all multiplayer objects in co-op
byte noNetBFG;
byte coopRespawnItems;
byte respawnMonstersNightmare;
Expand Down
4 changes: 3 additions & 1 deletion doomsday/plugins/jdoom/src/d_console.c
Expand Up @@ -86,7 +86,9 @@ cvartemplate_t gameCVars[] = {

// Items
{"server-game-nobfg", 0, CVT_BYTE, &cfg.noNetBFG, 0, 1},
{"server-game-coop-nothing", 0, CVT_BYTE, &cfg.noCoopAnything, 0, 1},
#if 0
{"server-game-coop-nothing", 0, CVT_BYTE, &cfg.noCoopAnything, 0, 1}, // not implemented atm, see P_SpawnMobj3f
#endif
{"server-game-coop-respawn-items", 0, CVT_BYTE,
&cfg.coopRespawnItems, 0, 1},
{"server-game-coop-noweapons", 0, CVT_BYTE, &cfg.noCoopWeapons, 0, 1},
Expand Down
6 changes: 6 additions & 0 deletions doomsday/plugins/jdoom/src/p_mobj.c
Expand Up @@ -763,9 +763,15 @@ mobj_t* P_SpawnMobj3f(mobjtype_t type, float x, float y, float z,
type <= MT_SUPERSHOTGUN)
return NULL;

/**
* @todo cfg.noCoopAnything: Exactly which objects is this supposed to
* prevent spawning? (at least not MT_PLAYER*...). -jk
*/
#if 0
// Don't spawn any special objects in coop?
if(cfg.noCoopAnything && !deathmatch)
return NULL;
#endif

// BFG disabled in netgames?
if(cfg.noNetBFG && type == MT_MISC25)
Expand Down
4 changes: 3 additions & 1 deletion doomsday/plugins/jdoom64/src/d_console.c
Expand Up @@ -106,7 +106,9 @@ cvartemplate_t gameCVars[] = {

// Items
{"server-game-nobfg", 0, CVT_BYTE, &cfg.noNetBFG, 0, 1},
{"server-game-coop-nothing", 0, CVT_BYTE, &cfg.noCoopAnything, 0, 1},
#if 0
{"server-game-coop-nothing", 0, CVT_BYTE, &cfg.noCoopAnything, 0, 1}, // not implemented atm, see P_SpawnMobj3f
#endif
{"server-game-coop-respawn-items", 0, CVT_BYTE,
&cfg.coopRespawnItems, 0, 1},
{"server-game-coop-noweapons", 0, CVT_BYTE, &cfg.noCoopWeapons, 0, 1},
Expand Down
6 changes: 6 additions & 0 deletions doomsday/plugins/jdoom64/src/p_mobj.c
Expand Up @@ -811,9 +811,15 @@ mobj_t* P_SpawnMobj3f(mobjtype_t type, float x, float y, float z,
type <= MT_SUPERSHOTGUN)
return NULL;

/**
* @todo cfg.noCoopAnything: Exactly which objects is this supposed to
* prevent spawning? (at least not MT_PLAYER*...). -jk
*/
#if 0
// Don't spawn any special objects in coop?
if(cfg.noCoopAnything && !deathmatch)
return NULL;
#endif

// BFG disabled in netgames?
if(cfg.noNetBFG && type == MT_MISC25)
Expand Down

0 comments on commit 5a492f5

Please sign in to comment.