unsigned short hash = CRC_Block_CaseInsensitive ((const unsigned char *)shader->name, strlen (shader->name));
q3shader_hash_entry_t* entry = q3shader_data->hash + (hash % Q3SHADER_HASH_SIZE);
q3shader_hash_entry_t* lastEntry = NULL;
- while (entry != NULL)
+ do
{
if (strcasecmp (entry->shader.name, shader->name) == 0)
{
lastEntry = entry;
entry = entry->chain;
}
+ while (entry != NULL);
if (entry == NULL)
{
if (lastEntry->shader.name[0] != 0)
if (!name)
name = "";
strlcpy(texture->name, name, sizeof(texture->name));
+ texture->basealpha = 1.0f;
shader = name[0] ? Mod_LookupQ3Shader(name) : NULL;
texflagsmask = ~0;
{
if(texture->skinframes[0]->hasalpha)
texture->basematerialflags |= MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED | MATERIALFLAG_NOSHADOW;
+ if (texture->q2contents)
+ texture->supercontents = Mod_Q2BSP_SuperContentsFromNativeContents(loadmodel, texture->q2contents);
}
else
success = false;