mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
d657692229
3 changed files with 7 additions and 3 deletions
|
@ -731,7 +731,6 @@ void R_EnterPortal (PortalDrawseg* pds, int depth)
|
|||
viewy = FLOAT2FIXED((y1 + r * dy)*2 - y);
|
||||
}
|
||||
viewangle = pds->src->Delta().Angle().BAMs() - startang;
|
||||
ViewAngle = AngleToFloat(viewangle);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -763,6 +762,7 @@ void R_EnterPortal (PortalDrawseg* pds, int depth)
|
|||
}
|
||||
}
|
||||
ViewAngle = AngleToFloat(viewangle);
|
||||
ViewPos = { FIXED2DBL(viewx), FIXED2DBL(viewy), FIXED2DBL(viewz) };
|
||||
|
||||
viewsin = finesine[viewangle>>ANGLETOFINESHIFT];
|
||||
viewcos = finecosine[viewangle>>ANGLETOFINESHIFT];
|
||||
|
@ -845,6 +845,7 @@ void R_EnterPortal (PortalDrawseg* pds, int depth)
|
|||
ViewPath[0] = savedpath[0];
|
||||
ViewPath[1] = savedpath[1];
|
||||
ViewAngle = AngleToFloat(viewangle);
|
||||
ViewPos = { FIXED2DBL(viewx), FIXED2DBL(viewy), FIXED2DBL(viewz) };
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -1083,6 +1083,7 @@ void R_DrawHeightPlanes(fixed_t height)
|
|||
viewz = pl->viewz;
|
||||
viewangle = pl->viewangle;
|
||||
ViewAngle = AngleToFloat(viewangle);
|
||||
ViewPos = { FIXED2DBL(viewx), FIXED2DBL(viewy), FIXED2DBL(viewz) };
|
||||
MirrorFlags = pl->MirrorFlags;
|
||||
R_DrawSinglePlane (pl, pl->sky & 0x7FFFFFFF, pl->Additive, true);
|
||||
}
|
||||
|
@ -1094,6 +1095,7 @@ void R_DrawHeightPlanes(fixed_t height)
|
|||
viewz = oViewZ;
|
||||
viewangle = oViewAngle;
|
||||
ViewAngle = AngleToFloat(viewangle);
|
||||
ViewPos = { FIXED2DBL(viewx), FIXED2DBL(viewy), FIXED2DBL(viewz) };
|
||||
}
|
||||
|
||||
|
||||
|
@ -1256,6 +1258,7 @@ void R_DrawSkyBoxes ()
|
|||
viewangle = pl->viewangle;
|
||||
}
|
||||
ViewAngle = AngleToFloat(viewangle);
|
||||
ViewPos = { FIXED2DBL(viewx), FIXED2DBL(viewy), FIXED2DBL(viewz) };
|
||||
|
||||
sky->bInSkybox = true;
|
||||
if (mate != NULL) mate->bInSkybox = true;
|
||||
|
@ -1371,6 +1374,7 @@ void R_DrawSkyBoxes ()
|
|||
extralight = savedextralight;
|
||||
viewangle = savedangle;
|
||||
ViewAngle = AngleToFloat(viewangle);
|
||||
ViewPos = { FIXED2DBL(viewx), FIXED2DBL(viewy), FIXED2DBL(viewz) };
|
||||
R_SetViewAngle ();
|
||||
|
||||
CurrentPortalInSkybox = false;
|
||||
|
|
|
@ -1227,7 +1227,6 @@ static void R_ProjectWallSprite(AActor *thing, fixed_t fx, fixed_t fy, fixed_t f
|
|||
void R_AddSprites (sector_t *sec, int lightlevel, int fakeside)
|
||||
{
|
||||
AActor *thing;
|
||||
F3DFloor *rover;
|
||||
F3DFloor *fakeceiling = NULL;
|
||||
F3DFloor *fakefloor = NULL;
|
||||
|
||||
|
@ -1249,7 +1248,7 @@ void R_AddSprites (sector_t *sec, int lightlevel, int fakeside)
|
|||
FIntCVar *cvar = thing->GetClass()->distancecheck;
|
||||
if (cvar != NULL && *cvar >= 0)
|
||||
{
|
||||
double dist = thing->Distance2DSquared(camera);
|
||||
double dist = (thing->PosRelative(viewsector) - ViewPos).LengthSquared();
|
||||
double check = (double)**cvar;
|
||||
if (dist >= check * check)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue