mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-26 13:41:04 +00:00
Do not render viewmobj or skybox viewpoint hitbox
If you are a spectator (or in first person), the hitbox exists right ontop of you and hitboxes don't render correctly if they are too close to the viewpoint.
This commit is contained in:
parent
694804cd96
commit
99653de134
1 changed files with 21 additions and 0 deletions
21
src/r_bbox.c
21
src/r_bbox.c
|
@ -253,6 +253,27 @@ boolean R_ThingBoundingBoxVisible(mobj_t *thing)
|
|||
{
|
||||
INT32 cvmode = cv_renderhitbox.value;
|
||||
|
||||
// Do not render bbox for these
|
||||
switch (thing->type)
|
||||
{
|
||||
default:
|
||||
// First person / awayviewmobj -- rendering
|
||||
// a bbox too close to the viewpoint causes
|
||||
// anomalies and these are exactly on the
|
||||
// viewpoint!
|
||||
if (thing != r_viewmobj)
|
||||
{
|
||||
break;
|
||||
}
|
||||
// FALLTHRU
|
||||
|
||||
case MT_SKYBOX:
|
||||
// Ditto for skybox viewpoint but because they
|
||||
// are rendered using portals in Software,
|
||||
// r_viewmobj does not point here.
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (cvmode)
|
||||
{
|
||||
case RENDERHITBOX_OFF:
|
||||
|
|
Loading…
Reference in a new issue