diff --git a/src/compatibility.cpp b/src/compatibility.cpp index cd74f5e34..718bfecee 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -90,7 +90,6 @@ static FCompatOption Options[] = { "resetplayerspeed", 0, BCOMPATF_RESETPLAYERSPEED }, { "vileghosts", 0, BCOMPATF_VILEGHOSTS }, { "ignoreteleporttags", 0, BCOMPATF_BADTELEPORTERS }, - { "oldportals", 0, BCOMPATF_BADPORTALS }, // list copied from g_mapinfo.cpp { "shorttex", COMPATF_SHORTTEX, 0 }, @@ -284,12 +283,6 @@ void CheckCompatibility(MapData *map) ib_compatflags = 0; ii_compatparams = -1; } - else if (Wads.GetLumpFile(map->lumpnum) == 1 && (gameinfo.flags & GI_COMPATPORTAL)) - { - ii_compatflags = 0; - ib_compatflags = BCOMPATF_BADPORTALS; - ii_compatparams = -1; - } else { map->GetChecksum(md5.Bytes); diff --git a/src/d_iwad.cpp b/src/d_iwad.cpp index 0c7cc3bf2..0999a77ea 100644 --- a/src/d_iwad.cpp +++ b/src/d_iwad.cpp @@ -174,7 +174,6 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize) else if(sc.Compare("Extended")) iwad->flags |= GI_MENUHACK_EXTENDED; else if(sc.Compare("Shorttex")) iwad->flags |= GI_COMPATSHORTTEX; else if(sc.Compare("Stairs")) iwad->flags |= GI_COMPATSTAIRS; - else if(sc.Compare("Portals")) iwad->flags |= GI_COMPATPORTAL; else sc.ScriptError(NULL); } while (sc.CheckString(",")); diff --git a/src/gi.h b/src/gi.h index 645f5d3ba..647db1a9b 100644 --- a/src/gi.h +++ b/src/gi.h @@ -47,7 +47,6 @@ #define GI_COMPATPOLY1 0x00000040 // Hexen's MAP36 needs old polyobject drawing #define GI_COMPATPOLY2 0x00000080 // so does HEXDD's MAP47 #define GI_NOTEXTCOLOR 0x00000100 // Chex Quest 3 would have everything green -#define GI_COMPATPORTAL 0x00000200 // Urban Brawl relies on the old portal code #include "gametype.h" diff --git a/src/p_spec.cpp b/src/p_spec.cpp index dd3e0ca11..cf97c16fc 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -921,39 +921,6 @@ static bool SpreadCeilingPortal(AStackPoint *pt, fixed_t alpha, sector_t *sector return fail; } -static bool SpreadFloorPortal(AStackPoint *pt, fixed_t alpha, sector_t *sector) -{ - bool fail = false; - sector->validcount = validcount; - for(int i=0; ilinecount; i++) - { - line_t *line = sector->lines[i]; - sector_t *backsector = sector == line->frontsector? line->backsector : line->frontsector; - if (line->backsector == line->frontsector) continue; - if (backsector == NULL) { fail = true; continue; } - if (backsector->validcount == validcount) continue; - if (backsector->FloorSkyBox == pt) continue; - - // Check if the backside would map to the same visplane - if (backsector->FloorSkyBox != NULL) { fail = true; continue; } - if (backsector->floorplane != sector->ceilingplane) { fail = true; continue; } - if (backsector->lightlevel != sector->lightlevel) { fail = true; continue; } - if (backsector->GetTexture(sector_t::floor) != sector->GetTexture(sector_t::floor)) { fail = true; continue; } - if (backsector->GetXOffset(sector_t::floor) != sector->GetXOffset(sector_t::floor)) { fail = true; continue; } - if (backsector->GetYOffset(sector_t::floor) != sector->GetYOffset(sector_t::floor)) { fail = true; continue; } - if (backsector->GetXScale(sector_t::floor) != sector->GetXScale(sector_t::floor)) { fail = true; continue; } - if (backsector->GetYScale(sector_t::floor) != sector->GetYScale(sector_t::floor)) { fail = true; continue; } - if (backsector->GetAngle(sector_t::floor) != sector->GetAngle(sector_t::floor)) { fail = true; continue; } - if (SpreadFloorPortal(pt, alpha, backsector)) { fail = true; continue; } - } - if (!fail) - { - sector->FloorSkyBox = pt; - sector->SetAlpha(sector_t::floor, alpha); - } - return fail; -} - void P_SetupPortals() { TThinkerIterator it; @@ -974,51 +941,6 @@ void P_SetupPortals() pt->special1 = 0; points.Push(pt); } - - // Maps using undefined portal hacks may not benefit from portal optimizations. - if (ib_compatflags & BCOMPATF_BADPORTALS) return; - - for(unsigned i=0;ispecial1 == 0 && points[i]->Mate != NULL) - { - for(unsigned j=1;jspecial1 == 0 && points[j]->Mate != NULL && points[i]->GetClass() == points[j]->GetClass()) - { - fixed_t deltax1 = points[i]->Mate->x - points[i]->x; - fixed_t deltay1 = points[i]->Mate->y - points[i]->y; - fixed_t deltax2 = points[j]->Mate->x - points[j]->x; - fixed_t deltay2 = points[j]->Mate->y - points[j]->y; - - if (deltax1 == deltax2 && deltay1 == deltay2) - { - if (points[j]->Sector->FloorSkyBox == points[j]->Mate) - points[j]->Sector->FloorSkyBox = points[i]->Mate; - - if (points[j]->Sector->CeilingSkyBox == points[j]->Mate) - points[j]->Sector->CeilingSkyBox = points[i]->Mate; - - points[j]->special1 = 1; - } - } - } - } - } - validcount++; - // Some fudging to preserve an unintended 'portal bleeding' effect caused by incomplete checks in the rendering code. - // Due to the addition of linedef-based portals this effect no longer works. - for(int i=0;ibAlways && sectors[i].validcount != validcount) - { - SpreadCeilingPortal(barrier_cast(sectors[i].CeilingSkyBox), sectors[i].GetAlpha(sector_t::ceiling), §ors[i]); - } - if (sectors[i].FloorSkyBox != NULL && sectors[i].FloorSkyBox->bAlways && sectors[i].validcount != validcount) - { - SpreadFloorPortal(barrier_cast(sectors[i].FloorSkyBox), sectors[i].GetAlpha(sector_t::floor), §ors[i]); - } - } } inline void SetPortal(sector_t *sector, int plane, AStackPoint *portal, fixed_t alpha) diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 3fa6bdf73..99872001a 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -584,7 +584,7 @@ visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightl check->viewz == stacked_viewz && ( // headache inducing logic... :( - (ib_compatflags & BCOMPATF_BADPORTALS) || + (!(skybox->flags & MF_JUSTATTACKED)) || ( check->alpha == alpha && (alpha == 0 || // if alpha is > 0 everything needs to be checked diff --git a/wadsrc/static/iwadinfo.txt b/wadsrc/static/iwadinfo.txt index 7a94f244a..efdf836a5 100644 --- a/wadsrc/static/iwadinfo.txt +++ b/wadsrc/static/iwadinfo.txt @@ -26,7 +26,6 @@ IWad Game = "Doom" Config = "UrbanBrawl" Mapinfo = "mapinfo/urbanbrawl.txt" - Compatibility = "Portals" MustContain = "MAP01", "AD2LIB" BannerColors = "a8 a8 00", "a8 00 00" }