mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Don't draw player mobj in first person
This solves that annoying albeit slightly amusing bug where your sprite clips into your view during a quake. For OpenGL, this also solves the player's model rendering while in first person. So you'll no longer be looking through Sonic's body!
This commit is contained in:
parent
f40e962816
commit
362c74ea65
2 changed files with 8 additions and 4 deletions
|
|
@ -5422,7 +5422,8 @@ static void HWR_AddSprites(sector_t *sec)
|
||||||
{
|
{
|
||||||
for (thing = sec->thinglist; thing; thing = thing->snext)
|
for (thing = sec->thinglist; thing; thing = thing->snext)
|
||||||
{
|
{
|
||||||
if (thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW)
|
if (thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW ||
|
||||||
|
thing == r_viewmobj)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
approx_dist = P_AproxDistance(viewx-thing->x, viewy-thing->y);
|
approx_dist = P_AproxDistance(viewx-thing->x, viewy-thing->y);
|
||||||
|
|
@ -5445,7 +5446,8 @@ static void HWR_AddSprites(sector_t *sec)
|
||||||
{
|
{
|
||||||
// Draw everything in sector, no checks
|
// Draw everything in sector, no checks
|
||||||
for (thing = sec->thinglist; thing; thing = thing->snext)
|
for (thing = sec->thinglist; thing; thing = thing->snext)
|
||||||
if (!(thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW))
|
if (!(thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW ||
|
||||||
|
thing == r_viewmobj))
|
||||||
HWR_ProjectSprite(thing);
|
HWR_ProjectSprite(thing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1845,7 +1845,8 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel)
|
||||||
{
|
{
|
||||||
for (thing = sec->thinglist; thing; thing = thing->snext)
|
for (thing = sec->thinglist; thing; thing = thing->snext)
|
||||||
{
|
{
|
||||||
if (thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW)
|
if (thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW ||
|
||||||
|
thing == r_viewmobj)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
approx_dist = P_AproxDistance(viewx-thing->x, viewy-thing->y);
|
approx_dist = P_AproxDistance(viewx-thing->x, viewy-thing->y);
|
||||||
|
|
@ -1868,7 +1869,8 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel)
|
||||||
{
|
{
|
||||||
// Draw everything in sector, no checks
|
// Draw everything in sector, no checks
|
||||||
for (thing = sec->thinglist; thing; thing = thing->snext)
|
for (thing = sec->thinglist; thing; thing = thing->snext)
|
||||||
if (!(thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW))
|
if (!(thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW ||
|
||||||
|
thing == r_viewmobj))
|
||||||
R_ProjectSprite(thing);
|
R_ProjectSprite(thing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue