diff --git a/src/game/behaviors/spawn_star.inc.c b/src/game/behaviors/spawn_star.inc.c index c6aecd244..4946e049c 100644 --- a/src/game/behaviors/spawn_star.inc.c +++ b/src/game/behaviors/spawn_star.inc.c @@ -16,7 +16,7 @@ void bhv_star_number_loop(void) { obj_set_angle(o, 0, 0, 0); obj_scale(o, 1.f); o->oAnimState = o->oBehParams2ndByte = ((star->oBehParams >> 24) & 0xFF) + 1; - o->header.gfx.node.flags = star->header.gfx.node.flags; + o->header.gfx.node.flags = star->header.gfx.node.flags | GRAPH_RENDER_BILLBOARD; } else { cur_obj_disable_rendering(); cur_obj_hide(); diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index 7357c9b67..1637c79a0 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -1235,6 +1235,7 @@ static void geo_process_object(struct Object *node) { } } + bool noBillboard = (node->header.gfx.sharedChild && node->header.gfx.sharedChild->extraFlags & GRAPH_EXTRA_FORCE_3D); if (node->header.gfx.areaIndex == gCurGraphNodeRoot->areaIndex) { if (node->header.gfx.throwMatrix != NULL) { @@ -1247,14 +1248,13 @@ static void geo_process_object(struct Object *node) { mtxf_copy(mtxf, node->header.gfx.prevThrowMatrix); mtxf_mul(gMatStackPrev[gMatStackIndex + 1], mtxf, gMatStackPrev[gMatStackIndex]); } else { - mtxf_mul(gMatStackPrev[gMatStackIndex + 1], (void *) node->header.gfx.throwMatrix, - gMatStackPrev[gMatStackIndex]); + mtxf_mul(gMatStackPrev[gMatStackIndex + 1], (void *) node->header.gfx.throwMatrix, gMatStackPrev[gMatStackIndex]); } mtxf_copy(node->header.gfx.prevThrowMatrix, *node->header.gfx.throwMatrix); node->header.gfx.prevThrowMatrixTimestamp = gGlobalTimer; - } else if ((node->header.gfx.node.flags & GRAPH_RENDER_CYLBOARD) && !(node->header.gfx.sharedChild && node->header.gfx.sharedChild->extraFlags & GRAPH_EXTRA_FORCE_3D)) { + } else if (node->header.gfx.node.flags & GRAPH_RENDER_CYLBOARD && !noBillboard) { Vec3f posPrev; @@ -1268,12 +1268,10 @@ static void geo_process_object(struct Object *node) { vec3f_copy(node->header.gfx.prevPos, node->header.gfx.pos); node->header.gfx.prevTimestamp = gGlobalTimer; - mtxf_cylboard(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex], - node->header.gfx.pos, gCurGraphNodeCamera->roll); - mtxf_cylboard(gMatStackPrev[gMatStackIndex + 1], gMatStackPrev[gMatStackIndex], - posPrev, gCurGraphNodeCamera->roll); + mtxf_cylboard(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex], node->header.gfx.pos, gCurGraphNodeCamera->roll); + mtxf_cylboard(gMatStackPrev[gMatStackIndex + 1], gMatStackPrev[gMatStackIndex], posPrev, gCurGraphNodeCamera->roll); - } else if ((node->header.gfx.node.flags & GRAPH_RENDER_BILLBOARD) && !(node->header.gfx.sharedChild && node->header.gfx.sharedChild->extraFlags & GRAPH_EXTRA_FORCE_3D)) { + } else if (node->header.gfx.node.flags & GRAPH_RENDER_BILLBOARD && !noBillboard) { Vec3f posPrev; @@ -1287,10 +1285,8 @@ static void geo_process_object(struct Object *node) { vec3f_copy(node->header.gfx.prevPos, node->header.gfx.pos); node->header.gfx.prevTimestamp = gGlobalTimer; - mtxf_billboard(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex], - node->header.gfx.pos, gCurGraphNodeCamera->roll); - mtxf_billboard(gMatStackPrev[gMatStackIndex + 1], gMatStackPrev[gMatStackIndex], - posPrev, gCurGraphNodeCamera->roll); + mtxf_billboard(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex], node->header.gfx.pos, gCurGraphNodeCamera->roll); + mtxf_billboard(gMatStackPrev[gMatStackIndex + 1], gMatStackPrev[gMatStackIndex], posPrev, gCurGraphNodeCamera->roll); } else {