This code was ported from the 2005 floating point version, at one point it replaced 128 with 0.5, but 128 as a fixed point value needs to be 1/512. as a floating point value.
This will fail when a trace starts directly on a block boundary in which case x is a whole number. It should always use 'floor(x)+1' to ensure that the calculated point is at the right or upper edge of a block.
* we do not really need compatibility PointOnLineSide here. Unlike the movement code it'd only affect some extreme edge cases.
* removed the special case for very short traces. This was a result of the original and very imprecise PointOnLine functions. Since those no longer get used here and floating point precision is a lot higher there is no need for this kind of treatment.
* PointOnLine checks for the sides of an actor's bounding box don't need a full PointOnLineSide call, a simple coordinate comparison is fully sufficient, and this can easily be done in the existing switch/case block.
This was accidentally deleted during one round of portal refactoring but is essential to prevent multiple teleport activations in one move.
Fixing this also allowed removing the fudging that was added to work around the issue in P_TryMove.
- This reverts commit c90a1c0c96.
- DECORATE looks to be very dependant on functions that take strings as
parameters receiving those strings as constants and not as expressions,
so being able to declare string variables with DECORATE is pretty much
useless.
- This is "support" in the very most basic sense. You can declare them,
but you can't actually do anything with them, since the decorate parser
can't handle expressions when it's parsing string arguments. However,
they seem to be getting properly initialized and destroyed, which is
what this was added to test. If it doesn't look like too much trouble, I
might try to turn them into something actually worth something.
- Values are tagged to allow for some measure of changing variable types
without automatically breaking savegames.
- Use these new methods to serialize the non-native variables in an
object. This allows for achiving non-ints.
This could happen if the damage calculations resulted in a value between 0 and 1, which for the actual check was multiplied with the damage parameter of P_RadiusAttack which inflated the fractional value to something that looked like actual damage but was later truncated.