Minor changes

This commit is contained in:
2026-04-29 18:34:39 +02:00
parent 0aecb35ab1
commit 3a5d831e71
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -390,7 +390,7 @@ void StaticModel::Draw(RenderContext& renderContext)
draw.World = &world;
draw.DrawState = &_drawState;
draw.Deformation = _deformation;
draw.Lightmap = _scene ? _scene->LightmapsData.GetReadyLightmap(Lightmap.TextureIndex) : nullptr;
draw.Lightmap = _scene && Lightmap.TextureIndex != -1 ? _scene->LightmapsData.GetReadyLightmap(Lightmap.TextureIndex) : nullptr;
draw.LightmapUVs = &Lightmap.UVsArea;
draw.Flags = _staticFlags;
draw.DrawModes = _drawModes;
@@ -427,7 +427,7 @@ void StaticModel::Draw(RenderContextBatch& renderContextBatch)
draw.World = &world;
draw.DrawState = &_drawState;
draw.Deformation = _deformation;
draw.Lightmap = _scene ? _scene->LightmapsData.GetReadyLightmap(Lightmap.TextureIndex) : nullptr;
draw.Lightmap = _scene && Lightmap.TextureIndex != -1 ? _scene->LightmapsData.GetReadyLightmap(Lightmap.TextureIndex) : nullptr;
draw.LightmapUVs = &Lightmap.UVsArea;
draw.Flags = _staticFlags;
draw.DrawModes = _drawModes;
@@ -434,6 +434,8 @@ cleanup:
DialogResult MessageBox::Show(Window* parent, const StringView& text, const StringView& caption, MessageBoxButtons buttons, MessageBoxIcon icon)
{
PROFILE_CPU();
// Construct input flags
UINT flags = 0;
switch (buttons)