From 4228386837f3413521e29a47f9101bc5ad56f631 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 2 Jan 2013 03:01:03 +0000 Subject: [PATCH] - Fixed: When P_Add3DFloor() adds the "inside" plane, it needs to copy the translucency flags from the original plane. SVN r4006 (trunk) --- src/p_3dfloors.cpp | 12 ++++++++---- src/p_3dfloors.h | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index 02c2702ff..56b34ca0f 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -108,7 +108,7 @@ void F3DFloor::UpdateColormap(FDynamicColormap *&map) // Add one 3D floor to the sector // //========================================================================== -static void P_Add3DFloor(sector_t* sec, sector_t* sec2, line_t* master, int flags,int transluc) +static void P_Add3DFloor(sector_t* sec, sector_t* sec2, line_t* master, int flags, int alpha) { F3DFloor* ffloor; unsigned i; @@ -179,7 +179,7 @@ static void P_Add3DFloor(sector_t* sec, sector_t* sec2, line_t* master, int flag ffloor->flags = flags; ffloor->master = master; - ffloor->alpha = transluc; + ffloor->alpha = alpha; ffloor->top.vindex = ffloor->bottom.vindex = -1; // The engine cannot handle sloped translucent floors. Sorry @@ -200,7 +200,11 @@ static void P_Add3DFloor(sector_t* sec, sector_t* sec2, line_t* master, int flag // kg3D - software renderer only hack // this is really required because of ceilingclip and floorclip - if(flags & FF_BOTHPLANES) P_Add3DFloor(sec, sec2, master, FF_EXISTS | FF_THISINSIDE | FF_RENDERPLANES | FF_NOSHADE | FF_SEETHROUGH | FF_SHOOTTHROUGH | (flags & FF_INVERTSECTOR), transluc); + if(flags & FF_BOTHPLANES) + { + P_Add3DFloor(sec, sec2, master, FF_EXISTS | FF_THISINSIDE | FF_RENDERPLANES | FF_NOSHADE | FF_SEETHROUGH | FF_SHOOTTHROUGH | + (flags & (FF_INVERTSECTOR | FF_TRANSLUCENT | FF_ADDITIVETRANS)), alpha); + } } //========================================================================== @@ -208,7 +212,7 @@ static void P_Add3DFloor(sector_t* sec, sector_t* sec2, line_t* master, int flag // Creates all 3D floors defined by one linedef // //========================================================================== -static int P_Set3DFloor(line_t * line, int param,int param2, int alpha) +static int P_Set3DFloor(line_t * line, int param, int param2, int alpha) { int s,i; int flags; diff --git a/src/p_3dfloors.h b/src/p_3dfloors.h index f9915348e..d0bca5e8f 100644 --- a/src/p_3dfloors.h +++ b/src/p_3dfloors.h @@ -36,7 +36,7 @@ typedef enum FF_FADEWALLS = 0x8000000, // Applies real fog to walls and doesn't blend the view FF_ADDITIVETRANS = 0x10000000, // Render this floor with additive translucency FF_FLOOD = 0x20000000, // extends towards the next lowest flooding or solid 3D floor or the bottom of the sector - FF_THISINSIDE = 0x40000000, // hack for software 3D with FF_BOTHPLANES + FF_THISINSIDE = 0x40000000, // hack for software 3D with FF_BOTHPLANES } ffloortype_e; // This is for the purpose of Sector_SetContents: