From 3a5d831e71f908fb5914e36054361f17b96cbe6e Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 29 Apr 2026 18:34:39 +0200 Subject: [PATCH] Minor changes --- Source/Engine/Level/Actors/StaticModel.cpp | 4 ++-- Source/Engine/Platform/Windows/WindowsPlatform.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Engine/Level/Actors/StaticModel.cpp b/Source/Engine/Level/Actors/StaticModel.cpp index 67d608523..e10117915 100644 --- a/Source/Engine/Level/Actors/StaticModel.cpp +++ b/Source/Engine/Level/Actors/StaticModel.cpp @@ -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; diff --git a/Source/Engine/Platform/Windows/WindowsPlatform.cpp b/Source/Engine/Platform/Windows/WindowsPlatform.cpp index 61deac794..7a08fc485 100644 --- a/Source/Engine/Platform/Windows/WindowsPlatform.cpp +++ b/Source/Engine/Platform/Windows/WindowsPlatform.cpp @@ -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)