Skip to content
Snippets Groups Projects
Commit 47b3c25b authored by Monster Iestyn's avatar Monster Iestyn
Browse files

Merge branch 'renderhitbox-nightsitems' into 'next'

Group NiGHTS star/chip hitboxes with rings

See merge request !2162
parents 4706e80d 59fc021d
Branches
Tags
2 merge requests!2355fix newer versions of mixerx,!2162Group NiGHTS star/chip hitboxes with rings
Pipeline #1457 passed
...@@ -267,18 +267,17 @@ static boolean is_tangible (mobj_t *thing) ...@@ -267,18 +267,17 @@ static boolean is_tangible (mobj_t *thing)
boolean R_ThingBoundingBoxVisible(mobj_t *thing) boolean R_ThingBoundingBoxVisible(mobj_t *thing)
{ {
INT32 cvmode = cv_renderhitbox.value; INT32 cvmode = cv_renderhitbox.value;
boolean ring = false;
if (multiplayer) // No hitboxes in multiplayer to avoid cheating if (multiplayer) // No hitboxes in multiplayer to avoid cheating
return false; return false;
// Do not render bbox for these
switch (thing->type) switch (thing->type)
{ {
default: default:
// First person / awayviewmobj -- rendering // First person / awayviewmobj -- rendering a bbox
// a bbox too close to the viewpoint causes // too close to the viewpoint causes anomalies
// anomalies and these are exactly on the // and these are exactly on the viewpoint!
// viewpoint!
if (thing != r_viewmobj) if (thing != r_viewmobj)
{ {
break; break;
...@@ -290,6 +289,17 @@ boolean R_ThingBoundingBoxVisible(mobj_t *thing) ...@@ -290,6 +289,17 @@ boolean R_ThingBoundingBoxVisible(mobj_t *thing)
// are rendered using portals in Software, // are rendered using portals in Software,
// r_viewmobj does not point here. // r_viewmobj does not point here.
return false; return false;
case MT_RING:
case MT_BLUESPHERE:
case MT_NIGHTSSTAR:
case MT_NIGHTSCHIP:
case MT_COIN:
// Rings and similar objects are often placed
// in large amounts, so they are handled
// separately from other tangible objects.
ring = true;
break;
} }
switch (cvmode) switch (cvmode)
...@@ -304,16 +314,10 @@ boolean R_ThingBoundingBoxVisible(mobj_t *thing) ...@@ -304,16 +314,10 @@ boolean R_ThingBoundingBoxVisible(mobj_t *thing)
return !is_tangible(thing); return !is_tangible(thing);
case RENDERHITBOX_TANGIBLE: case RENDERHITBOX_TANGIBLE:
// Exclude rings from here, lots of them! return !ring && is_tangible(thing);
if (thing->type == MT_RING)
{
return false;
}
return is_tangible(thing);
case RENDERHITBOX_RINGS: case RENDERHITBOX_RINGS:
return (thing->type == MT_RING || thing->type == MT_BLUESPHERE); return ring;
default: default:
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment