From dab1e7baa42d3ef01e20f8bf7671530a0b016c82 Mon Sep 17 00:00:00 2001 From: danij Date: Wed, 24 Mar 2010 17:13:26 +0000 Subject: [PATCH] Fixed Heretic: "Scrolling flats too slow". (see here http://sourceforge.net/tracker/?func=detail&aid=2947141&group_id=74815&atid=542099) Added Heretic: cvar "server-game-plane-fixmaterialscroll" 1=Fix bug in original Heretic which would only allow scrolling materials on planes to move east (enabled by default). --- doomsday/plugins/jheretic/data/conhelp.txt | 3 +++ doomsday/plugins/jheretic/include/h_config.h | 1 + doomsday/plugins/jheretic/src/h_console.c | 1 + doomsday/plugins/jheretic/src/p_spec.c | 17 ++++++++++------- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/doomsday/plugins/jheretic/data/conhelp.txt b/doomsday/plugins/jheretic/data/conhelp.txt index 3b6744f100..2fe0bb1fb9 100644 --- a/doomsday/plugins/jheretic/data/conhelp.txt +++ b/doomsday/plugins/jheretic/data/conhelp.txt @@ -720,6 +720,9 @@ desc = 1=Allow jumping in multiplayer games. [server-game-maulotaur-fixfloorfire] desc = 1=Fix bug in original Heretic which would explode the Maulotaur floor fire if spawned while it's feet are clipped. +[server-game-plane-fixmaterialscroll] +desc = 1=Fix bug in original Heretic which would only allow scrolling materials on planes to move east. + [server-game-nomonsters] desc = 1=No monsters. diff --git a/doomsday/plugins/jheretic/include/h_config.h b/doomsday/plugins/jheretic/include/h_config.h index ec8e524e4c..5ced4cf82d 100644 --- a/doomsday/plugins/jheretic/include/h_config.h +++ b/doomsday/plugins/jheretic/include/h_config.h @@ -139,6 +139,7 @@ typedef struct jheretic_config_s { byte fallOff; // Objects fall under their own weight. byte fixFloorFire; // Fix Heretic bug; explode Maulotaur floor fire when feetclipped. + byte fixPlaneScrollMaterialsEastOnly; // Fix Heretic bug; plane materials would only scroll east. byte counterCheat; float counterCheatScale; diff --git a/doomsday/plugins/jheretic/src/h_console.c b/doomsday/plugins/jheretic/src/h_console.c index 8ed754bc0a..4fc26be006 100644 --- a/doomsday/plugins/jheretic/src/h_console.c +++ b/doomsday/plugins/jheretic/src/h_console.c @@ -174,6 +174,7 @@ cvar_t gameCVars[] = { {"game-zclip", 0, CVT_BYTE, &cfg.moveCheckZ, 0, 1}, {"game-corpse-sliding", 0, CVT_BYTE, &cfg.slidingCorpses, 0, 1}, {"server-game-maulotaur-fixfloorfire", 0, CVT_BYTE, &cfg.fixFloorFire, 0, 1}, + {"server-game-plane-fixmaterialscroll", 0, CVT_BYTE, &cfg.fixPlaneScrollMaterialsEastOnly, 0, 1}, // Game state {"game-fastmonsters", 0, CVT_BYTE, &cfg.fastMonsters, 0, 1}, diff --git a/doomsday/plugins/jheretic/src/p_spec.c b/doomsday/plugins/jheretic/src/p_spec.c index b6b30fcdf7..60712e892a 100644 --- a/doomsday/plugins/jheretic/src/p_spec.c +++ b/doomsday/plugins/jheretic/src/p_spec.c @@ -1117,8 +1117,10 @@ void P_UpdateSpecials(void) case 27: case 28: case 29: + if(!cfg.fixPlaneScrollMaterialsEastOnly) + break; texOff[VY] = P_GetFloat(DMU_SECTOR, i, DMU_FLOOR_MATERIAL_OFFSET_Y); - texOff[VY] -= PLANE_MATERIAL_SCROLLUNIT * (1 + sect->special - 25); + texOff[VY] -= PLANE_MATERIAL_SCROLLUNIT * (1 + (sect->special - 25)*2); P_SetFloat(DMU_SECTOR, i, DMU_FLOOR_MATERIAL_OFFSET_Y, texOff[VY]); break; @@ -1128,7 +1130,7 @@ void P_UpdateSpecials(void) case 23: case 24: texOff[VX] = P_GetFloat(DMU_SECTOR, i, DMU_FLOOR_MATERIAL_OFFSET_X); - texOff[VX] -= PLANE_MATERIAL_SCROLLUNIT * (1 + sect->special - 20); + texOff[VX] -= PLANE_MATERIAL_SCROLLUNIT * (1 + (sect->special - 20)*2); P_SetFloat(DMU_SECTOR, i, DMU_FLOOR_MATERIAL_OFFSET_X, texOff[VX]); break; @@ -1143,8 +1145,10 @@ void P_UpdateSpecials(void) case 32: case 33: case 34: + if(!cfg.fixPlaneScrollMaterialsEastOnly) + break; texOff[VY] = P_GetFloat(DMU_SECTOR, i, DMU_FLOOR_MATERIAL_OFFSET_Y); - texOff[VY] += PLANE_MATERIAL_SCROLLUNIT * (1 + sect->special - 30); + texOff[VY] += PLANE_MATERIAL_SCROLLUNIT * (1 + (sect->special - 30)*2); P_SetFloat(DMU_SECTOR, i, DMU_FLOOR_MATERIAL_OFFSET_Y, texOff[VY]); break; @@ -1153,15 +1157,14 @@ void P_UpdateSpecials(void) case 37: case 38: case 39: + if(!cfg.fixPlaneScrollMaterialsEastOnly) + break; texOff[VX] = P_GetFloat(DMU_SECTOR, i, DMU_FLOOR_MATERIAL_OFFSET_X); - texOff[VX] += PLANE_MATERIAL_SCROLLUNIT * (1 + sect->special - 35); + texOff[VX] += PLANE_MATERIAL_SCROLLUNIT * (1 + (sect->special - 35)*2); P_SetFloat(DMU_SECTOR, i, DMU_FLOOR_MATERIAL_OFFSET_X, texOff[VX]); break; default: - // DJS - Is this really necessary every tic? - P_SetFloat(DMU_SECTOR, i, DMU_FLOOR_MATERIAL_OFFSET_X, 0); - P_SetFloat(DMU_SECTOR, i, DMU_FLOOR_MATERIAL_OFFSET_Y, 0); break; } }