mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-21 10:20:46 +00:00
Add error detections when the surfaces sizes do not match
This commit is contained in:
parent
439c47d399
commit
3943123ef6
1 changed files with 11 additions and 0 deletions
|
@ -3160,6 +3160,17 @@ void MapLoader::LoadLightmap(MapData* map)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (realSurface.texWidth != surface.width || realSurface.texHeight != surface.height)
|
||||
{
|
||||
errors = true;
|
||||
if (developer >= 1)
|
||||
{
|
||||
Printf("Surface size mismatch: Attempting to remap %dx%d to %dx%d pixel area.\n", surface.width, surface.height, realSurface.texWidth, realSurface.texHeight);
|
||||
}
|
||||
realSurface.needsUpdate = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (developer >= 5)
|
||||
{
|
||||
Printf("Mapping lightmap surface pixels[%u] (count: %u) -> ((x:%d, y:%d), (x2:%d, y2:%d), page:%d) area: %u\n",
|
||||
|
|
Loading…
Reference in a new issue