Skip to content

Commit

Permalink
Fixed Heretic: "Scrolling flats too slow". (see here http://sourcefor…
Browse files Browse the repository at this point in the history
…ge.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).
  • Loading branch information
danij-deng committed Mar 24, 2010
1 parent 17b6349 commit dab1e7b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
3 changes: 3 additions & 0 deletions doomsday/plugins/jheretic/data/conhelp.txt
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jheretic/include/h_config.h
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jheretic/src/h_console.c
Expand Up @@ -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},
Expand Down
17 changes: 10 additions & 7 deletions doomsday/plugins/jheretic/src/p_spec.c
Expand Up @@ -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;

Expand All @@ -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;

Expand All @@ -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;

Expand All @@ -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;
}
}
Expand Down

0 comments on commit dab1e7b

Please sign in to comment.