diff --git a/doomsday/apps/client/src/client/clientsubsector.cpp b/doomsday/apps/client/src/client/clientsubsector.cpp index 0c829d31f9..01def4a12d 100644 --- a/doomsday/apps/client/src/client/clientsubsector.cpp +++ b/doomsday/apps/client/src/client/clientsubsector.cpp @@ -1207,12 +1207,14 @@ DENG2_PIMPL(ClientSubsector) // We may need to update one or both mapped planes. maybeInvalidateMapping(plane.indexInSector()); + /* // We may need to fix newly revealed missing materials. self().forAllEdgeLoops([] (ClEdgeLoop &loop) { loop.fixSurfacesMissingMaterials(); return LoopContinue; }); + */ // We may need to project new decorations. markDependentSurfacesForRedecoration(plane); diff --git a/doomsday/apps/client/src/dd_main.cpp b/doomsday/apps/client/src/dd_main.cpp index 17f988ad10..0672e0ff14 100644 --- a/doomsday/apps/client/src/dd_main.cpp +++ b/doomsday/apps/client/src/dd_main.cpp @@ -2540,6 +2540,7 @@ DENG_EXTERN_C void R_SetupMap(dint mode, dint flags) #endif #ifdef __CLIENT__ + /* // Update all sectors. /// @todo Refactor away. map.forAllSectors([] (Sector §or) @@ -2553,6 +2554,7 @@ DENG_EXTERN_C void R_SetupMap(dint mode, dint flags) }); }); }); + */ #endif // Re-initialize polyobjs. diff --git a/doomsday/apps/client/src/render/rend_main.cpp b/doomsday/apps/client/src/render/rend_main.cpp index 2261a90ae0..b744f24f7d 100644 --- a/doomsday/apps/client/src/render/rend_main.cpp +++ b/doomsday/apps/client/src/render/rend_main.cpp @@ -730,8 +730,26 @@ ClientMaterial *Rend_ChooseMapSurfaceMaterial(Surface const &surface) case 1: // Normal mode. if (!(devNoTexFix && surface.hasFixMaterial())) { + if (!surface.hasMaterial() && surface.parent().type() == DMU_SIDE) + { + const Line::Side &side = surface.parent().as(); + if (side.hasSector()) + { + // Use the ceiling for missing top section, and floor for missing bottom section. + if (&surface == &side.bottom()) + { + return static_cast(side.sector().floor().surface().materialPtr()); + } + else if (&surface == &side.top()) + { + return static_cast(side.sector().ceiling().surface().materialPtr()); + } + } + } if (surface.hasMaterial() || surface.parent().type() != DMU_PLANE) + { return static_cast(surface.materialPtr()); + } } // Use special "missing" material. @@ -2700,20 +2718,20 @@ static void writeWall(WallEdge const &leftEdge, WallEdge const &rightEdge, { if (glowFactor > .0001f) { - if (material == surface.materialPtr()) - { - parm.glowing = matAnimator.glowStrength(); - } - else - { - auto *actualMaterial = - surface.hasMaterial() ? static_cast(surface.materialPtr()) - : &ClientMaterial::find(de::Uri("System", Path("missing"))); +// if (material == surface.materialPtr()) +// { + parm.glowing = matAnimator.glowStrength(); +// } +// else +// { +// auto *actualMaterial = +// surface.hasMaterial() ? static_cast(surface.materialPtr()) +// : &ClientMaterial::find(de::Uri("System", Path("missing"))); - parm.glowing = actualMaterial->getAnimator(Rend_MapSurfaceMaterialSpec()).glowStrength(); - } +// parm.glowing = actualMaterial->getAnimator(Rend_MapSurfaceMaterialSpec()).glowStrength(); +// } - parm.glowing *= ::glowFactor; + parm.glowing *= glowFactor; } projectDynamics(surface, parm.glowing, *parm.topLeft, *parm.bottomRight, diff --git a/doomsday/apps/client/src/world/base/clientserverworld.cpp b/doomsday/apps/client/src/world/base/clientserverworld.cpp index a0a963246c..ab43f6ca3f 100644 --- a/doomsday/apps/client/src/world/base/clientserverworld.cpp +++ b/doomsday/apps/client/src/world/base/clientserverworld.cpp @@ -589,6 +589,7 @@ DENG2_PIMPL(ClientServerWorld) }); #ifdef __CLIENT__ + /* /// @todo Refactor away: map->forAllSectors([] (Sector §or) { @@ -601,6 +602,7 @@ DENG2_PIMPL(ClientServerWorld) }); }); }); + */ #endif map->initPolyobjs();