- removed the one-sided line portals on polyobjects only limitation. Using Eternity's polyportal testmap shows that it expects one-sided crossable portals on non-polyobject walls.

- converted the P_TranslatePortal* functions to use floating point trigonometry. The combination of R_PointToAngle and finesine even created discrepancies with perfectly parallel portals which is just not acceptable.
- added a function to FPathTraverse to relocate the trace and restart from the new position.
- made P_UseLines portal aware. Traversal through line portals is complete (all types, even teleporters), whether sector portals need better treatment remains to be seen - at the moment it only checks the range at the player's vertical center.
This commit is contained in:
Christoph Oelckers 2016-03-01 01:36:36 +01:00
commit 2584108200
9 changed files with 133 additions and 64 deletions

View file

@ -112,7 +112,7 @@ static bool P_StartButton (side_t *side, int Where, FSwitchDef *Switch, fixed_t
//
//==========================================================================
bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno)
bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno, fixedvec3 *optpos)
{
// Activated from an empty side -> always succeed
side_t *side = line->sidedef[sideno];
@ -140,7 +140,7 @@ bool P_CheckSwitchRange(AActor *user, line_t *line, int sideno)
P_MakeDivline (line, &dll);
fixedvec3 pos = user->PosRelative(line);
fixedvec3 pos = optpos? *optpos : user->PosRelative(line);
dlu.x = pos.x;
dlu.y = pos.y;
dlu.dx = finecosine[user->angle >> ANGLETOFINESHIFT];