mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
Disabled vertice off-screen check, but fixed it at the same time. If it's desired, the solution is simply commented out in the event its desired.
This commit is contained in:
parent
18e7b56bdc
commit
38eb6db9ce
1 changed files with 14 additions and 7 deletions
|
@ -540,7 +540,6 @@ bool HUDSprite::GetWeaponRect(HWDrawInfo *di, DPSprite *psp, float sx, float sy,
|
||||||
if (psp->scale.X == 0.0 || psp->scale.Y == 0.0)
|
if (psp->scale.X == 0.0 || psp->scale.Y == 0.0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool vertsOnScreen = false;
|
|
||||||
const bool interp = (psp->InterpolateTic || psp->Flags & PSPF_INTERPOLATE);
|
const bool interp = (psp->InterpolateTic || psp->Flags & PSPF_INTERPOLATE);
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
|
@ -549,15 +548,23 @@ bool HUDSprite::GetWeaponRect(HWDrawInfo *di, DPSprite *psp, float sx, float sy,
|
||||||
if (interp)
|
if (interp)
|
||||||
t = psp->Prev.v[i] + (psp->Vert.v[i] - psp->Prev.v[i]) * ticfrac;
|
t = psp->Prev.v[i] + (psp->Vert.v[i] - psp->Prev.v[i]) * ticfrac;
|
||||||
|
|
||||||
if (!vertsOnScreen)
|
|
||||||
vertsOnScreen = (t.X >= 0.0 && t.X <= vw);
|
|
||||||
|
|
||||||
Vert.v[i] = t;
|
Vert.v[i] = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!vertsOnScreen)
|
// [MC] If this is absolutely necessary, uncomment it. It just checks if all the vertices
|
||||||
|
// are all off screen either to the right or left, but is it honestly needed?
|
||||||
|
/*
|
||||||
|
if ((
|
||||||
|
Vert.v[0].X > 0.0 &&
|
||||||
|
Vert.v[1].X > 0.0 &&
|
||||||
|
Vert.v[2].X > 0.0 &&
|
||||||
|
Vert.v[3].X > 0.0) || (
|
||||||
|
Vert.v[0].X < vw &&
|
||||||
|
Vert.v[1].X < vw &&
|
||||||
|
Vert.v[2].X < vw &&
|
||||||
|
Vert.v[3].X < vw))
|
||||||
return false;
|
return false;
|
||||||
|
*/
|
||||||
auto verts = screen->mVertexData->AllocVertices(4);
|
auto verts = screen->mVertexData->AllocVertices(4);
|
||||||
mx = verts.second;
|
mx = verts.second;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue