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(texture->skinframes[0]->hasalpha)
texture->basematerialflags |= MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED | MATERIALFLAG_NOSHADOW;
- texture->q2flags = texture->skinframes[0]->q2flags;
- texture->q2value = texture->skinframes[0]->q2value;
- texture->q2contents = texture->skinframes[0]->q2contents;
if (texture->q2contents)
texture->supercontents = Mod_Q2BSP_SuperContentsFromNativeContents(loadmodel, texture->q2contents);
}