diff --git a/engine/sw/d_sprite.c b/engine/sw/d_sprite.c index ddd75c52b..f6ef8d4ee 100644 --- a/engine/sw/d_sprite.c +++ b/engine/sw/d_sprite.c @@ -1070,18 +1070,18 @@ void D_DrawSprite (void) D_SpriteDrawSpans16 (sprite_spans); else //1 { - if (currententity->alpha > TRANS_LOWER_CAP) + if (currententity->shaderRGBAf[3] > TRANS_LOWER_CAP) { if (currententity->flags & Q2RF_ADDATIVE) { - D_SetTransLevel(currententity->alpha, BM_ADD); + D_SetTransLevel(currententity->shaderRGBAf[3], BM_ADD); D_SpriteDrawSpansAdditive (sprite_spans); } - else if (currententity->alpha > TRANS_UPPER_CAP) + else if (currententity->shaderRGBAf[3] > TRANS_UPPER_CAP) D_SpriteDrawSpans (sprite_spans); else { - D_SetTransLevel(currententity->alpha, BM_BLEND); + D_SetTransLevel(currententity->shaderRGBAf[3], BM_BLEND); D_SpriteDrawSpansTrans (sprite_spans); } } diff --git a/engine/sw/r_alias.c b/engine/sw/r_alias.c index bb64ca646..542de1dea 100644 --- a/engine/sw/r_alias.c +++ b/engine/sw/r_alias.c @@ -878,22 +878,22 @@ void R_AliasDrawModel (alight_t *plighting) if (r_pixbytes == 1) { - if (currententity->alpha < TRANS_LOWER_CAP) + if (currententity->shaderRGBAf[3] < TRANS_LOWER_CAP) return; - if (currententity->alpha > TRANS_UPPER_CAP) + if (currententity->shaderRGBAf[3] > TRANS_UPPER_CAP) { transbackfac = 0; } else { - D_SetTransLevel(currententity->alpha, BM_BLEND); + D_SetTransLevel(currententity->shaderRGBAf[3], BM_BLEND); transbackfac = 1; } } else { - transfactor = currententity->alpha*255; + transfactor = currententity->shaderRGBAf[3]*255; transbackfac = 255 - transfactor; } diff --git a/engine/sw/sw_model.c b/engine/sw/sw_model.c index 6f4f9ea69..00602a294 100644 --- a/engine/sw/sw_model.c +++ b/engine/sw/sw_model.c @@ -3066,7 +3066,7 @@ void SWMod_LoadAlias3Model (model_t *mod, void *buffer) #endif #ifdef AVAIL_PNGLIB if (!texture) - texture = ReadPNGFile(buffer, com_filesize, &width, &height); + texture = ReadPNGFile(buffer, com_filesize, &width, &height, pinskin->name); #endif if (!texture) texture = ReadPCXFile(buffer, com_filesize, &width, &height);