Hexen Super-damaging sectors!
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
.63 .96 - Hexen Super-damaging sectors!
In Hexen, if you set a floor to X_001 (the lava), and set certian specials (movement), it will become insanely damaging - you die in less than a second after touching it. :shock:
Last edited by udderdude on Sat May 21, 2005 8:32 am, edited 1 time in total.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49225
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
As a workaround you can just create a second lava animation which uses X_002 as its base picture and use a standard bitmask damage type for the sector. You don't even need to duplicate any graphics for that.
As for the cause of the bug:
The damage for these sectors is incorrectly applied in both P_PlayerInSpecialSector and P_PlayerOnSpecialFlat. The on in P_PlayerInSpecialSector is not only unnecessary, worse, it contains a bug which causes it to do damage every time the function is called. But it is only called when there is a sector special so it doesn't happen when the sector is 'normal'.
THe following piece of code has to be removed from P_PlayerInSpecialSector:
As for the cause of the bug:
The damage for these sectors is incorrectly applied in both P_PlayerInSpecialSector and P_PlayerOnSpecialFlat. The on in P_PlayerInSpecialSector is not only unnecessary, worse, it contains a bug which causes it to do damage every time the function is called. But it is only called when there is a sector special so it doesn't happen when the sector is 'normal'.
THe following piece of code has to be removed from P_PlayerInSpecialSector:
Code: Select all
int terrainnum = TerrainTypes[sector->floorpic];
if (Terrains[terrainnum].DamageAmount &&
(level.time & Terrains[terrainnum].DamageTimeMask))
{
P_DamageMobj (player->mo, NULL, NULL, Terrains[terrainnum].DamageAmount,
Terrains[terrainnum].DamageMOD);
}