From 5a492f50b937e4bdc1e009cb296f211fe76dd994 Mon Sep 17 00:00:00 2001 From: skyjake Date: Mon, 19 Mar 2012 18:14:28 +0200 Subject: [PATCH] Doom|Fixed: Disabled malfunctioning "server-game-coop-nothing" 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 --- doomsday/plugins/jdoom/include/d_config.h | 2 +- doomsday/plugins/jdoom/src/d_console.c | 4 +++- doomsday/plugins/jdoom/src/p_mobj.c | 6 ++++++ doomsday/plugins/jdoom64/src/d_console.c | 4 +++- doomsday/plugins/jdoom64/src/p_mobj.c | 6 ++++++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/doomsday/plugins/jdoom/include/d_config.h b/doomsday/plugins/jdoom/include/d_config.h index 5be86c6487..183ae358c2 100644 --- a/doomsday/plugins/jdoom/include/d_config.h +++ b/doomsday/plugins/jdoom/include/d_config.h @@ -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; diff --git a/doomsday/plugins/jdoom/src/d_console.c b/doomsday/plugins/jdoom/src/d_console.c index 57a5a21fd8..d5fdd282d6 100644 --- a/doomsday/plugins/jdoom/src/d_console.c +++ b/doomsday/plugins/jdoom/src/d_console.c @@ -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}, diff --git a/doomsday/plugins/jdoom/src/p_mobj.c b/doomsday/plugins/jdoom/src/p_mobj.c index 7a3312aac8..63043aaeb4 100644 --- a/doomsday/plugins/jdoom/src/p_mobj.c +++ b/doomsday/plugins/jdoom/src/p_mobj.c @@ -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) diff --git a/doomsday/plugins/jdoom64/src/d_console.c b/doomsday/plugins/jdoom64/src/d_console.c index 703113f6fe..d76a3b5b5f 100644 --- a/doomsday/plugins/jdoom64/src/d_console.c +++ b/doomsday/plugins/jdoom64/src/d_console.c @@ -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}, diff --git a/doomsday/plugins/jdoom64/src/p_mobj.c b/doomsday/plugins/jdoom64/src/p_mobj.c index f97bbf9193..2a5378aa4c 100644 --- a/doomsday/plugins/jdoom64/src/p_mobj.c +++ b/doomsday/plugins/jdoom64/src/p_mobj.c @@ -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)