mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +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
bbbe76d2ca
commit
542e38e717
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)
|
||||
{
|
||||
if (thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW)
|
||||
if (thing->sprite == SPR_NULL || thing->flags2 & MF2_DONTDRAW ||
|
||||
thing == r_viewmobj)
|
||||
continue;
|
||||
|
||||
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
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1845,7 +1845,8 @@ void R_AddSprites(sector_t *sec, INT32 lightlevel)
|
|||
{
|
||||
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;
|
||||
|
||||
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
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue