The original Doom playsim logic used 16.16 fixed-point numbers, which meant that there was a fixed (but universally constant) limit on number precision.
Doomsday has been switched to using floating point coordinates. However, floats can represent values with much higher precision. This leads to behavioral discrepancies when compared to the original logic.
This commit adds a FRACEPSILON constant for use with float comparisons to match the precision of 16.16 fixed point values. When the "game-mobj-fracepsilon" cvar is set to 1, mobj collision tests are carried out so that FRACEPSILON is taken into consideration.
This fixes the problem in Doom E1M7 where a pillar doesn't lower when the player crosses the trigger because the mobjs on the pillar are placed so that their bounding boxes just touch the walls of the sector.
"game-mobj-fracepsilon" presently defaults to zero.
Added: Console variable "game-mobj-fracepsilon" (default: 0)
The original Doom playsim logic used 16.16 fixed-point numbers,
which meant that there was a fixed (but universally constant) limit
on number precision.
Doomsday has been switched to using floating point coordinates.
However, floats can represent values with much higher precision.
This leads to behavioral discrepancies when compared to the
original logic.
This commit adds a FRACEPSILON constant for use with float
comparisons to match the precision of 16.16 fixed point values.
When the "game-mobj-fracepsilon" cvar is set to 1, mobj collision
tests are carried out so that FRACEPSILON is taken into consideration.
This fixes the problem in Doom E1M7 where a pillar doesn't lower
when the player crosses the trigger because the mobjs on the pillar
are placed so that their bounding boxes just touch the walls of the
sector.
"game-mobj-fracepsilon" presently defaults to zero.