- changed mirror handling so that it works without attaching a portal to the mirror line and removed line_t::portal_mirror member.
- did some cleanup on the portal interface on linedefs: All checks should go through isLinePortal (gameplay related) and isVisualPortal (renderer related) which then can decide on the actual data what to return. - removed portal_passive because it won't survive the upcoming refactoring. - removed all direct access to portal members of line_t. - always use the precise (and fast) version of P_PointOnLineSide inside the renderer.
This commit is contained in:
parent
00895c245e
commit
a85a8c1465
5 changed files with 34 additions and 40 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include "p_lnspec.h"
|
||||
#include "templates.h"
|
||||
#include "doomdef.h"
|
||||
#include "m_swap.h"
|
||||
|
|
@ -339,11 +340,11 @@ static inline bool R_ClipSpriteColumnWithPortals (fixed_t x, fixed_t y, vissprit
|
|||
if (!seg->curline) continue;
|
||||
|
||||
line_t* line = seg->curline->linedef;
|
||||
// divline? wtf, anyway, divlines aren't supposed to be drawn. But I definitely saw NULL linedefs in drawsegs.
|
||||
// ignore minisegs from GL nodes.
|
||||
if (!line) continue;
|
||||
|
||||
// check if this line will clip sprites to itself
|
||||
if (!line->portal)
|
||||
if (!line->isVisualPortal() && line->special != Line_Mirror)
|
||||
continue;
|
||||
|
||||
// don't clip sprites with portal's back side (it's transparent)
|
||||
|
|
@ -739,7 +740,7 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
|
||||
// [ZZ] Or less definitely not visible (hue)
|
||||
// [ZZ] 10.01.2016: don't try to clip stuff inside a skybox against the current portal.
|
||||
if (!CurrentPortalInSkybox && CurrentPortal && !!P_PointOnLineSide(thing->X(), thing->Y(), CurrentPortal->dst))
|
||||
if (!CurrentPortalInSkybox && CurrentPortal && !!P_PointOnLineSidePrecise(thing->X(), thing->Y(), CurrentPortal->dst))
|
||||
return;
|
||||
|
||||
// [RH] Interpolate the sprite's position to make it look smooth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue