mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-21 11:01:01 +00:00
- ignore y-flipping when rendering slope sprites in the new renderer.
This is what Polymost, and apparently NBlood, do here.
This commit is contained in:
parent
551ff89778
commit
9680ff1863
1 changed files with 3 additions and 1 deletions
|
@ -121,7 +121,10 @@ void HWFlat::MakeVertices(HWDrawInfo* di)
|
||||||
{
|
{
|
||||||
vec2_t pos[4];
|
vec2_t pos[4];
|
||||||
int ofsz[4];
|
int ofsz[4];
|
||||||
|
auto cstat = Sprite->cstat;
|
||||||
|
if (Sprite->clipdist & TSPR_SLOPESPRITE) cstat &= ~CSTAT_SPRITE_YFLIP; // NBlood doesn't y-flip slope sprites.
|
||||||
GetFlatSpritePosition(Sprite, Sprite->pos.vec2, pos, ofsz, true);
|
GetFlatSpritePosition(Sprite, Sprite->pos.vec2, pos, ofsz, true);
|
||||||
|
Sprite->cstat = cstat;
|
||||||
|
|
||||||
auto ret = screen->mVertexData->AllocVertices(6);
|
auto ret = screen->mVertexData->AllocVertices(6);
|
||||||
auto vp = ret.first;
|
auto vp = ret.first;
|
||||||
|
@ -129,7 +132,6 @@ void HWFlat::MakeVertices(HWDrawInfo* di)
|
||||||
float y = !(Sprite->cstat & CSTAT_SPRITE_YFLIP) ? 0.f : 1.f;
|
float y = !(Sprite->cstat & CSTAT_SPRITE_YFLIP) ? 0.f : 1.f;
|
||||||
if (Sprite->clipdist & TSPR_SLOPESPRITE)
|
if (Sprite->clipdist & TSPR_SLOPESPRITE)
|
||||||
{
|
{
|
||||||
|
|
||||||
int posx = int(di->Viewpoint.Pos.X * 16.f);
|
int posx = int(di->Viewpoint.Pos.X * 16.f);
|
||||||
int posy = int(di->Viewpoint.Pos.Y * -16.f);
|
int posy = int(di->Viewpoint.Pos.Y * -16.f);
|
||||||
int posz = int(di->Viewpoint.Pos.Z * -256.f);
|
int posz = int(di->Viewpoint.Pos.Z * -256.f);
|
||||||
|
|
Loading…
Reference in a new issue