From 8132b2fd5758cadd562134ddccc00095e5d64d34 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 13 Oct 2021 02:08:25 +0000 Subject: [PATCH] Bake patches into submodels in reverse order... This should fix submodel patch issues with _q3bsp_bihtraces. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6084 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/gl_q2bsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/common/gl_q2bsp.c b/engine/common/gl_q2bsp.c index c2aac80a9..be820398b 100644 --- a/engine/common/gl_q2bsp.c +++ b/engine/common/gl_q2bsp.c @@ -1109,7 +1109,7 @@ static qboolean CM_CreatePatchesForLeafs (model_t *loadmodel, cminfo_t *prv) memset (checkout, -1, sizeof(int)*prv->numfaces); - for (i = 0; i < prv->numcmodels; i++) + for (i = prv->numcmodels; i-- > 0; ) { prv->cmodels[i].firstpatch = prv->numpatches; prv->cmodels[i].firstcmesh = prv->numcmeshes;