From 31d6a2a3b261bb2a944a0e8970bf11718706c47b Mon Sep 17 00:00:00 2001 From: uncletrunks Date: Thu, 14 May 2020 20:47:55 -0500 Subject: [PATCH] more cylindrical billboarding stuff --- src/game/rendering_graph_node.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c index dd66b033..70d31a00 100644 --- a/src/game/rendering_graph_node.c +++ b/src/game/rendering_graph_node.c @@ -802,14 +802,12 @@ static void geo_process_object(struct Object *node) { if (node->header.gfx.throwMatrix != NULL) { mtxf_mul(gMatStack[gMatStackIndex + 1], (void *) node->header.gfx.throwMatrix, gMatStack[gMatStackIndex]); + } else if (node->header.gfx.node.flags & GRAPH_RENDER_CYLBOARD) { + mtxf_cylboard(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex], + node->header.gfx.pos, gCurGraphNodeCamera->roll); } else if (node->header.gfx.node.flags & GRAPH_RENDER_BILLBOARD) { - if (node->header.gfx.node.flags & GRAPH_RENDER_CYLBOARD){ - mtxf_cylboard(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex], - node->header.gfx.pos, gCurGraphNodeCamera->roll); - } else { - mtxf_billboard(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex], - node->header.gfx.pos, gCurGraphNodeCamera->roll); - } + mtxf_billboard(gMatStack[gMatStackIndex + 1], gMatStack[gMatStackIndex], + node->header.gfx.pos, gCurGraphNodeCamera->roll); } else { mtxf_rotate_zxy_and_translate(mtxf, node->header.gfx.pos, node->header.gfx.angle); mtxf_mul(gMatStack[gMatStackIndex + 1], mtxf, gMatStack[gMatStackIndex]);