- 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:
parent
6bcaa51968
commit
2584108200
9 changed files with 133 additions and 64 deletions
|
|
@ -201,14 +201,14 @@ bool CheckIfExitIsGood (AActor *self, level_info_t *info)
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType)
|
||||
bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType, fixedvec3 *optpos)
|
||||
{
|
||||
int lineActivation;
|
||||
INTBOOL repeat;
|
||||
INTBOOL buttonSuccess;
|
||||
BYTE special;
|
||||
|
||||
if (!P_TestActivateLine (line, mo, side, activationType))
|
||||
if (!P_TestActivateLine (line, mo, side, activationType, optpos))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -262,7 +262,7 @@ bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType)
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
bool P_TestActivateLine (line_t *line, AActor *mo, int side, int activationType)
|
||||
bool P_TestActivateLine (line_t *line, AActor *mo, int side, int activationType, fixedvec3 *optpos)
|
||||
{
|
||||
int lineActivation = line->activation;
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ bool P_TestActivateLine (line_t *line, AActor *mo, int side, int activationType)
|
|||
}
|
||||
if (activationType == SPAC_Use || activationType == SPAC_UseBack)
|
||||
{
|
||||
if (!P_CheckSwitchRange(mo, line, side))
|
||||
if (!P_CheckSwitchRange(mo, line, side, optpos))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue