From 4d8b131a49a2033c4492940aa69f3edba7409890 Mon Sep 17 00:00:00 2001 From: danij Date: Mon, 6 Feb 2012 07:09:36 +0000 Subject: [PATCH] HacX|Fixed: Buzzer moves much faster than it should Disabled the -fast mode manipulation of the Thing definitions when playing HacX and Chex Quest. These games use different values than those used by Doom. Todo: Implement a mechanism to handle this properly... --- doomsday/plugins/common/src/g_game.c | 72 +++++++++++++++------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/doomsday/plugins/common/src/g_game.c b/doomsday/plugins/common/src/g_game.c index 7bf8c95a14..422aab4f61 100644 --- a/doomsday/plugins/common/src/g_game.c +++ b/doomsday/plugins/common/src/g_game.c @@ -2596,50 +2596,54 @@ void G_InitNew(skillmode_t skill, uint episode, uint map) respawnMonsters = cfg.respawnMonstersNightmare; #endif -//// \kludge Doom/Heretic Fast Monters/Missiles -#if __JDOOM__ || __JDOOM64__ - // Fast monsters? - if(fastParm -# if __JDOOM__ - || (skill == SM_NIGHTMARE && gameSkill != SM_NIGHTMARE) -# endif - ) + // Disabled in Chex and HacX because this messes with the original games' values. + if(gameMode != doom2_hacx && gameMode != doom_chex) { - for(i = S_SARG_RUN1; i <= S_SARG_RUN8; ++i) - STATES[i].tics = 1; - for(i = S_SARG_ATK1; i <= S_SARG_ATK3; ++i) - STATES[i].tics = 4; - for(i = S_SARG_PAIN; i <= S_SARG_PAIN2; ++i) - STATES[i].tics = 1; - } - else - { - for(i = S_SARG_RUN1; i <= S_SARG_RUN8; ++i) - STATES[i].tics = 2; - for(i = S_SARG_ATK1; i <= S_SARG_ATK3; ++i) - STATES[i].tics = 8; - for(i = S_SARG_PAIN; i <= S_SARG_PAIN2; ++i) - STATES[i].tics = 2; - } + /// @kludge Doom/Heretic Fast Monters/Missiles +#if __JDOOM__ || __JDOOM64__ + // Fast monsters? + if(fastParm + # if __JDOOM__ + || (skill == SM_NIGHTMARE && gameSkill != SM_NIGHTMARE) + # endif + ) + { + for(i = S_SARG_RUN1; i <= S_SARG_RUN8; ++i) + STATES[i].tics = 1; + for(i = S_SARG_ATK1; i <= S_SARG_ATK3; ++i) + STATES[i].tics = 4; + for(i = S_SARG_PAIN; i <= S_SARG_PAIN2; ++i) + STATES[i].tics = 1; + } + else + { + for(i = S_SARG_RUN1; i <= S_SARG_RUN8; ++i) + STATES[i].tics = 2; + for(i = S_SARG_ATK1; i <= S_SARG_ATK3; ++i) + STATES[i].tics = 8; + for(i = S_SARG_PAIN; i <= S_SARG_PAIN2; ++i) + STATES[i].tics = 2; + } #endif - // Fast missiles? + // Fast missiles? #if __JDOOM__ || __JHERETIC__ || __JDOOM64__ # if __JDOOM64__ - speed = fastParm; + speed = fastParm; # elif __JDOOM__ - speed = (fastParm || (skill == SM_NIGHTMARE && gameSkill != SM_NIGHTMARE)); + speed = (fastParm || (skill == SM_NIGHTMARE && gameSkill != SM_NIGHTMARE)); # else - speed = skill == SM_NIGHTMARE; + speed = skill == SM_NIGHTMARE; # endif - for(i = 0; MonsterMissileInfo[i].type != -1; ++i) - { - MOBJINFO[MonsterMissileInfo[i].type].speed = - MonsterMissileInfo[i].speed[speed]; - } + for(i = 0; MonsterMissileInfo[i].type != -1; ++i) + { + MOBJINFO[MonsterMissileInfo[i].type].speed = + MonsterMissileInfo[i].speed[speed]; + } #endif -// <-- KLUDGE + // <-- KLUDGE + } if(!IS_CLIENT) {