mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-31 05:20:51 +00:00
No sprite billboarding on papersprites
This commit is contained in:
parent
1f1d67cd7e
commit
b304b268c8
1 changed files with 7 additions and 3 deletions
|
@ -4249,7 +4249,9 @@ static void HWR_DrawSpriteShadow(gr_vissprite_t *spr, GLPatch_t *gpatch, float t
|
||||||
// This is expecting a pointer to an array containing 4 wallVerts for a sprite
|
// This is expecting a pointer to an array containing 4 wallVerts for a sprite
|
||||||
static void HWR_RotateSpritePolyToAim(gr_vissprite_t *spr, FOutVector *wallVerts)
|
static void HWR_RotateSpritePolyToAim(gr_vissprite_t *spr, FOutVector *wallVerts)
|
||||||
{
|
{
|
||||||
if (cv_grspritebillboarding.value && spr && spr->mobj && wallVerts)
|
if (cv_grspritebillboarding.value
|
||||||
|
&& spr && spr->mobj && !(spr->mobj->frame & FF_PAPERSPRITE)
|
||||||
|
&& wallVerts)
|
||||||
{
|
{
|
||||||
float basey = FIXED_TO_FLOAT(spr->mobj->z);
|
float basey = FIXED_TO_FLOAT(spr->mobj->z);
|
||||||
float lowy = wallVerts[0].y;
|
float lowy = wallVerts[0].y;
|
||||||
|
@ -4530,7 +4532,8 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
||||||
wallVerts[1].y = endbot;
|
wallVerts[1].y = endbot;
|
||||||
|
|
||||||
// The x and y only need to be adjusted in the case that it's not a papersprite
|
// The x and y only need to be adjusted in the case that it's not a papersprite
|
||||||
if (cv_grspritebillboarding.value && spr->mobj)
|
if (cv_grspritebillboarding.value
|
||||||
|
&& spr->mobj && !(spr->mobj->frame & FF_PAPERSPRITE))
|
||||||
{
|
{
|
||||||
// Get the x and z of the vertices so billboarding draws correctly
|
// Get the x and z of the vertices so billboarding draws correctly
|
||||||
realheight = realbot - realtop;
|
realheight = realbot - realtop;
|
||||||
|
@ -4559,7 +4562,8 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
||||||
wallVerts[0].y = wallVerts[1].y = bot;
|
wallVerts[0].y = wallVerts[1].y = bot;
|
||||||
|
|
||||||
// The x and y only need to be adjusted in the case that it's not a papersprite
|
// The x and y only need to be adjusted in the case that it's not a papersprite
|
||||||
if (cv_grspritebillboarding.value && spr->mobj)
|
if (cv_grspritebillboarding.value
|
||||||
|
&& spr->mobj && !(spr->mobj->frame & FF_PAPERSPRITE))
|
||||||
{
|
{
|
||||||
// Get the x and z of the vertices so billboarding draws correctly
|
// Get the x and z of the vertices so billboarding draws correctly
|
||||||
realheight = realbot - realtop;
|
realheight = realbot - realtop;
|
||||||
|
|
Loading…
Reference in a new issue