mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
Fix improper culling of mirrored player models
This commit is contained in:
parent
5d98a20e76
commit
4c0a226536
2 changed files with 12 additions and 3 deletions
|
@ -1500,6 +1500,7 @@ void geo_process_node_and_siblings(struct GraphNode *firstNode) {
|
|||
|
||||
do {
|
||||
if (curGraphNode == NULL) {
|
||||
LOG_ERROR("Graph Node null!");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1509,10 +1510,16 @@ void geo_process_node_and_siblings(struct GraphNode *firstNode) {
|
|||
}
|
||||
|
||||
// Sanity check our stack index, If we above or equal to our stack size. Return to prevent OOB\.
|
||||
if ((gMatStackIndex + 1) >= MATRIX_STACK_SIZE) { break; }
|
||||
if ((gMatStackIndex + 1) >= MATRIX_STACK_SIZE) {
|
||||
LOG_ERROR("Graph Node matrix stack overflow!");
|
||||
break;
|
||||
}
|
||||
|
||||
// Break out of endless loops
|
||||
if (++depthSanity > 5000) { break; }
|
||||
if (++depthSanity > 5000) {
|
||||
LOG_ERROR("Graph Node too deep!");
|
||||
break;
|
||||
}
|
||||
|
||||
if (curGraphNode->flags & GRAPH_RENDER_ACTIVE) {
|
||||
if (curGraphNode->flags & GRAPH_RENDER_CHILDREN_FIRST) {
|
||||
|
|
|
@ -998,7 +998,9 @@ static void OPTIMIZE_O3 gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t
|
|||
break;
|
||||
case G_CULL_BOTH:
|
||||
// Why is this even an option?
|
||||
return;
|
||||
// HACK: Instead of culling both sides and displaying nothing, cull nothing and display everything
|
||||
// this is needed because of the mirror room... some custom models will set/clear cull values resulting in cull both
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue