]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
set supercontents and surfaceflags on models not using shaders
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 18 Feb 2010 04:01:53 +0000 (04:01 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 18 Feb 2010 04:01:53 +0000 (04:01 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9978 d7cf8633-e32d-0410-b094-e92efae38249

model_alias.c
model_sprite.c

index 3e59f9cd517245ce252a452e28dc3a9020fecc0f..9fd4d1cce97d4d622a7f580ee185f26c18099edc 100644 (file)
@@ -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)
index 5fe6fdf3074f1bec5fb73e19ca5e7d9c4b2cb23e..a33fa9f36635c5b8f11a38e9ec29d0951225f5f0 100644 (file)
@@ -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)