This currently only works for linked portals. For other types some major refactoring may be necessary because it not only requires multiple passes of P_RadiusAttack but also an alteration of how sight checks work.
- fixed: P_FindFloorCeiling set the floorsector for a new ceilingheight.
Note: P_DrawRailTrail still needs to be changed, at the moment rail trails through portals will not work correctly.
- be a bit smarter about what to copy from a subtrace. There's 3 distinct pieces of information here: The hit itself, the CrossedWater setting for Boom-transfers and the CrossedWater setting for 3D floors.
Note: Ideally this should return all water hits it can detect, not just the first one.
- fixed: FMultiBlockLinesIterator initialized continueup twice but forgot continuedown.
- fixed: One of the debug messages in P_AimLineAttack was missing an if (aimdebug).
- Added new state options that DECORATE got to the lemon parser.
- Enable token generation for state options. They were previously not
generated, so the grammar treated them as function calls instead.
- I don't remember why I thought using PPointer as the metatype for
PClassPointer would be preferable, but it means that PPointer's MatchID
can potentially be called for PClassPointer entries.
* any line completely parallel to the portal is rejected
* any line with one end on the same straight line than the portal is solely decided by the other vertex.
* any line with both ends behind the portal cannot be visible inside, so there's no need to check for an intersection with the view range.
* due to the above P_IntersectLines could be removed as it was redundant.
* for any line that does intersect with the portal straight, do a reverse check: If both ends of the portal lie on the other side of the line than the viewpoint, the line is between viewpoint and portal and needs to be rejected.
This fixes nearly all the phantom wall glitches in the demo map.
* when starting directly on a blockline the trace was offset by one map unit. Do this only for the internal block trace calculations but not for the variable that's being exposed to the outside because in rare situations that can create incorrect values.
* using startfrac could lead to an actor whose inside was right at that positon to be missed.
* when using startfrac the adjusted trace start was not used for all calculations, which could cause the trace to fail.
With these issues fixed, P_AimLineAttack can now successfully navigate line portals.