if (!gl_mtexable)
gl_multitexture.value = 0;
glDisable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glShadeModel(GL_FLAT);
// make sure zbuffer is enabled
glEnable(GL_DEPTH_TEST);
data2 = malloc(tx->width*tx->height);
for (j = 0;j < tx->width*tx->height;j++)
data2[j] = data[j] >= 224 ? 0 : data[j]; // no fullbrights
- tx->gl_texturenum = GL_LoadTexture (tx->name, tx->width, tx->height, data2, true, 0, 1);
+ tx->gl_texturenum = GL_LoadTexture (tx->name, tx->width, tx->height, data2, true, transparent, 1);
strcpy(name, tx->name);
strcat(name, "_glow");
for (j = 0;j < tx->width*tx->height;j++)
data2[j] = data[j] >= 224 ? data[j] : 0; // only fullbrights
- tx->gl_glowtexturenum = GL_LoadTexture (name, tx->width, tx->height, data2, true, 0, 1);
+ tx->gl_glowtexturenum = GL_LoadTexture (name, tx->width, tx->height, data2, true, transparent, 1);
free(data2);
}
else
if (val = GETEDICTFIELDVALUE(ent, eval_alpha))
if ((alpha = (int) (val->_float * 255.0)) == 0)
alpha = 255;
- if (val = GETEDICTFIELDVALUE(ent, eval_renderamt)) // HalfLife support
- alpha -= (int) val->_float;
+ if ((val = GETEDICTFIELDVALUE(ent, eval_renderamt)) && val->_float != 0) // HalfLife support
+ alpha = (int) val->_float;
if (alpha < 0) alpha = 0;
if (alpha > 255) alpha = 255;