mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
polymost.c: fix display of floor-aligned sprites ornameted to the ceiling.
git-svn-id: https://svn.eduke32.com/eduke32@5158 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
77c5056f22
commit
d9c171d499
1 changed files with 5 additions and 3 deletions
|
@ -4425,8 +4425,10 @@ void polymost_drawsprite(int32_t snum)
|
||||||
if (j == tspr->owner)
|
if (j == tspr->owner)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
const int foff_sign = (tspr->z > globalposz) ? -1 : 1;
|
||||||
|
|
||||||
{
|
{
|
||||||
float const f = ((float) (tspr->z - globalposz) - (i * r_fspr_offset)) * gyxscale;
|
float const f = ((float) (tspr->z - globalposz) + foff_sign*(i * r_fspr_offset)) * gyxscale;
|
||||||
|
|
||||||
for (int j = 0; j < npoints; j++)
|
for (int j = 0; j < npoints; j++)
|
||||||
{
|
{
|
||||||
|
@ -4439,7 +4441,7 @@ void polymost_drawsprite(int32_t snum)
|
||||||
// gd? Copied from floor rendering code
|
// gd? Copied from floor rendering code
|
||||||
|
|
||||||
xtex.d = 0;
|
xtex.d = 0;
|
||||||
ytex.d = gxyaspect / (double)(tspr->z - globalposz - (i * r_fspr_offset));
|
ytex.d = gxyaspect / (double)(tspr->z - globalposz + foff_sign*(i * r_fspr_offset));
|
||||||
otex.d = -ghoriz * ytex.d;
|
otex.d = -ghoriz * ytex.d;
|
||||||
|
|
||||||
// copied&modified from relative alignment
|
// copied&modified from relative alignment
|
||||||
|
|
Loading…
Reference in a new issue