mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
Enforce ZDRay limit on default sampledistance when loading LIGHTMAP to avoid surface size mismatches.
This commit is contained in:
parent
dec222c9fe
commit
439c47d399
1 changed files with 10 additions and 7 deletions
|
@ -2964,16 +2964,19 @@ void MapLoader::InitLevelMesh(MapData* map)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Last chance to make up our mind whether to use lightmaps or not
|
|
||||||
if (!Level->lightmaps)
|
|
||||||
{
|
|
||||||
if (map->Size(ML_LIGHTMAP))
|
if (map->Size(ML_LIGHTMAP))
|
||||||
{
|
{
|
||||||
Level->lightmaps = true;
|
// Arbitrary ZDRay limit. This will break lightmap lump loading if not enforced.
|
||||||
|
Level->LightmapSampleDistance = Level->LightmapSampleDistance < 8 ? 8 : Level->LightmapSampleDistance;
|
||||||
|
|
||||||
|
if (!Level->lightmaps) // We are unfortunately missing ZDRayInfo
|
||||||
|
{
|
||||||
Printf(PRINT_HIGH, "InitLevelMesh: The level contains LIGHTMAP, but no ZDRayInfo thing was detected in the level.\n");
|
Printf(PRINT_HIGH, "InitLevelMesh: The level contains LIGHTMAP, but no ZDRayInfo thing was detected in the level.\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Level->lightmaps = *genlightmaps;
|
else
|
||||||
|
{
|
||||||
|
Level->lightmaps = Level->lightmaps || *genlightmaps; // Allow lightmapping in non-lightmapped levels.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Levelmesh and lightmap binding/loading
|
// Levelmesh and lightmap binding/loading
|
||||||
|
|
Loading…
Reference in a new issue