From: lordhavoc Date: Tue, 22 Jan 2002 05:32:02 +0000 (+0000) Subject: more thorough checking of 'this should never happen' cases X-Git-Tag: RELEASE_0_2_0_RC1~703 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=100cdcd17cf64cf354c9a9c874347a188bbe3787;p=xonotic%2Fdarkplaces.git 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 --- 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;