From 100cdcd17cf64cf354c9a9c874347a188bbe3787 Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Tue, 22 Jan 2002 05:32:02 +0000 Subject: [PATCH] more thorough checking of 'this should never happen' cases git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1381 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_decals.c | 2 +- r_decals.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cl_decals.c b/cl_decals.c index 9fe650e9..5bea3dec 100644 --- a/cl_decals.c +++ b/cl_decals.c @@ -225,7 +225,7 @@ void CL_UpdateDecals (void) if (p->tex == 0) continue; - if (p->ent && p->ent->visframe == r_framecount && p->ent->model != p->model) + if (p->ent && p->ent->visframe == r_framecount && (p->ent->model != p->model || p->ent->model->type != mod_brush)) { p->tex = 0; continue; diff --git a/r_decals.c b/r_decals.c index 07a350fc..05861c17 100644 --- a/r_decals.c +++ b/r_decals.c @@ -85,6 +85,8 @@ void R_DrawDecals (void) continue; Mod_CheckLoaded(r->ent->model); + if (r->ent->model->type != mod_brush) + continue; surf = r->ent->model->surfaces + r->surface; -- 2.39.2