From caf55d8aa7707c0e3346fa904c9ebf179b2645c2 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 18 Feb 2010 04:01:53 +0000 Subject: [PATCH] set supercontents and surfaceflags on models not using shaders git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9978 d7cf8633-e32d-0410-b094-e92efae38249 --- model_alias.c | 4 ++++ model_sprite.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/model_alias.c b/model_alias.c index 3e59f9cd..9fd4d1cc 100644 --- a/model_alias.c +++ b/model_alias.c @@ -942,6 +942,10 @@ static void Mod_BuildAliasSkinFromSkinFrame(texture_t *texture, skinframe_t *ski texture->currentmaterialflags = texture->basematerialflags; texture->specularscalemod = 1; texture->specularpowermod = 1; + texture->surfaceflags = 0; + texture->supercontents = SUPERCONTENTS_SOLID; + if (!(texture->basematerialflags & MATERIALFLAG_BLENDED)) + texture->supercontents |= SUPERCONTENTS_OPAQUE; } void Mod_BuildAliasSkinsFromSkinFiles(texture_t *skin, skinfile_t *skinfile, const char *meshname, const char *shadername) diff --git a/model_sprite.c b/model_sprite.c index 5fe6fdf3..a33fa9f3 100644 --- a/model_sprite.c +++ b/model_sprite.c @@ -59,6 +59,10 @@ static void Mod_SpriteSetupTexture(texture_t *texture, skinframe_t *skinframe, q texture->currentmaterialflags = texture->basematerialflags; texture->numskinframes = 1; texture->currentskinframe = texture->skinframes[0] = skinframe; + texture->surfaceflags = 0; + texture->supercontents = SUPERCONTENTS_SOLID; + if (!(texture->basematerialflags & MATERIALFLAG_BLENDED)) + texture->supercontents |= SUPERCONTENTS_OPAQUE; } static void Mod_Sprite_SharedSetup(const unsigned char *datapointer, int version, const unsigned int *palette, qboolean additive) -- 2.39.2