From 848b605c6c3ce0d37cc8f906e0d55eeb8f48abfe Mon Sep 17 00:00:00 2001 From: Shpoike Date: Thu, 4 Aug 2022 07:07:15 +0100 Subject: [PATCH] Small code cleanup allowing to trim an unused field from mnode_t, which should help cpu cache a smidge. --- Quake/gl_model.c | 17 ----------------- Quake/gl_model.h | 2 -- 2 files changed, 19 deletions(-) diff --git a/Quake/gl_model.c b/Quake/gl_model.c index 2151fade..e8b3709e 100644 --- a/Quake/gl_model.c +++ b/Quake/gl_model.c @@ -1751,21 +1751,6 @@ static void Mod_LoadFaces (lump_t *l, qboolean bsp2) } } - -/* -================= -Mod_SetParent -================= -*/ -static void Mod_SetParent (mnode_t *node, mnode_t *parent) -{ - node->parent = parent; - if (node->contents < 0) - return; - Mod_SetParent (node->children[0], node); - Mod_SetParent (node->children[1], node); -} - /* ================= Mod_LoadNodes @@ -1939,8 +1924,6 @@ static void Mod_LoadNodes (lump_t *l, int bsp2) Mod_LoadNodes_L1(l); else Mod_LoadNodes_S(l); - -// Mod_SetParent (loadmodel->nodes, NULL); // sets nodes and leafs } static void Mod_ProcessLeafs_S (dsleaf_t *in, int filelen) diff --git a/Quake/gl_model.h b/Quake/gl_model.h index cfbd3a09..bb02a5a2 100644 --- a/Quake/gl_model.h +++ b/Quake/gl_model.h @@ -172,8 +172,6 @@ typedef struct mnode_s float minmaxs[6]; // for bounding box culling - struct mnode_s *parent; - // node specific mplane_t *plane; struct mnode_s *children[2];