mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Merge branch 'orbital-disappearing' into 'master'
Don't clip player MD2 when looking straight down with the orbital camera See merge request STJr/SRB2!658
This commit is contained in:
commit
feb0fc2ee9
1 changed files with 16 additions and 2 deletions
|
@ -5486,6 +5486,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
spritedef_t *sprdef;
|
spritedef_t *sprdef;
|
||||||
spriteframe_t *sprframe;
|
spriteframe_t *sprframe;
|
||||||
spriteinfo_t *sprinfo;
|
spriteinfo_t *sprinfo;
|
||||||
|
md2_t *md2;
|
||||||
size_t lumpoff;
|
size_t lumpoff;
|
||||||
unsigned rot;
|
unsigned rot;
|
||||||
UINT8 flip;
|
UINT8 flip;
|
||||||
|
@ -5522,8 +5523,21 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
tz = (tr_x * gr_viewcos) + (tr_y * gr_viewsin);
|
tz = (tr_x * gr_viewcos) + (tr_y * gr_viewsin);
|
||||||
|
|
||||||
// thing is behind view plane?
|
// thing is behind view plane?
|
||||||
if (tz < ZCLIP_PLANE && !papersprite && (!cv_grmodels.value || md2_models[thing->sprite].notfound == true)) //Yellow: Only MD2's dont disappear
|
if (tz < ZCLIP_PLANE && !papersprite)
|
||||||
|
{
|
||||||
|
if (cv_grmodels.value) //Yellow: Only MD2's dont disappear
|
||||||
|
{
|
||||||
|
if (thing->skin && thing->sprite == SPR_PLAY)
|
||||||
|
md2 = &md2_playermodels[( (skin_t *)thing->skin - skins )];
|
||||||
|
else
|
||||||
|
md2 = &md2_models[thing->sprite];
|
||||||
|
|
||||||
|
if (md2->notfound || md2->scale < 0.0f)
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// The above can stay as it works for cutting sprites that are too close
|
// The above can stay as it works for cutting sprites that are too close
|
||||||
tr_x = FIXED_TO_FLOAT(thing->x);
|
tr_x = FIXED_TO_FLOAT(thing->x);
|
||||||
|
|
Loading…
Reference in a new issue