Skip to content

Commit

Permalink
Fix close after save tga overview
Browse files Browse the repository at this point in the history
  • Loading branch information
UnrealKaraulov committed Dec 15, 2024
1 parent 7cbdad1 commit 9af382f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/bsp/Bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1336,15 +1336,15 @@ void Bsp::resize_all_lightmaps(bool logged)
for (int faceId = 0; faceId < faceCount; faceId++)
{
BSPFACE32& face = faces[faceId];
int newLightMapOffset = static_cast<int>(newLightData.size());
int newLightMapOffset = (int)newLightData.size();
for (int lightId = 0; lightId < MAX_LIGHTMAPS; lightId++)
{
if (face.nStyles[lightId] == 255 || face.nLightmapOffset < 0)
{
continue;
}
int size[2] = { 0, 0 };
if (faceId < static_cast<int>(undo_lightmaps.size()))
if (faceId < (int)undo_lightmaps.size())
{
size[0] = undo_lightmaps[faceId].width;
size[1] = undo_lightmaps[faceId].height;
Expand Down
2 changes: 1 addition & 1 deletion src/editor/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ void Renderer::renderLoop()
make_screenshot_target++;


if (make_screenshot <= 0)
if (make_screenshot <= 0 && !ortho_save_tga)
{
is_closing = true;
}
Expand Down

0 comments on commit 9af382f

Please sign in to comment.