From c951431a4996622f6cf202ea6f057b53aaea98ec Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Sat, 3 Mar 2001 22:10:56 +0000 Subject: [PATCH] fixed transparent color in HL textures (was red, should be blue... oops) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@175 d7cf8633-e32d-0410-b094-e92efae38249 --- model_brush.c | 5 ++++- wad.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/model_brush.c b/model_brush.c index e0bd20f4..3f09262d 100644 --- a/model_brush.c +++ b/model_brush.c @@ -193,8 +193,11 @@ void Mod_LoadTextures (lump_t *l) out[1] = pal[p+1]; out[2] = pal[p+2]; out[3] = 255; - if (out[0] == 255 && out[1] == 0 && out[2] == 0) // HL transparent color (pure blue) + if (out[0] == 0 && out[1] == 0 && out[2] == 255) // HL transparent color (pure blue) + { out[0] = out[1] = out[2] = out[3] = 0; + transparent = TRUE; + } out += 4; } } diff --git a/wad.c b/wad.c index 058e07b0..9fc1237d 100644 --- a/wad.c +++ b/wad.c @@ -354,7 +354,7 @@ byte *W_GetTexture(char *name, int matchwidth, int matchheight) for (i = 0;i < image_width*image_height;i++) { c = *indata++; - if (pal[c][0] == 255 && pal[c][1] == 0 && pal[c][2] == 0) // HL transparent color (pure blue) + if (pal[c][0] == 0 && pal[c][1] == 0 && pal[c][2] == 255) // HL transparent color (pure blue) outdata[0] = outdata[1] = outdata[2] = outdata[3] = 0; else { -- 2.39.2