1
0
forked from mirrors/0ad

Fixes crash in Atlas when switching from the Actor viewer. Fixes #6524

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4732
This was SVN commit r27041.
This commit is contained in:
vladislavbelov
2022-08-10 17:17:24 +00:00
parent d1c9e96f87
commit 95106b2d9b
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -450,7 +450,7 @@ void CMiniMapTexture::RenderFinalTexture(
CmpPtr<ICmpRangeManager> cmpRangeManager(m_Simulation, SYSTEM_ENTITY);
ENSURE(cmpRangeManager);
CLOSTexture& losTexture = g_Game->GetView()->GetLOSTexture();
CLOSTexture& losTexture = g_Renderer.GetSceneRenderer().GetScene().GetLOSTexture();
const float invTileMapSize = 1.0f / static_cast<float>(TERRAIN_TILE_SIZE * m_MapSize);
const float texCoordMax = m_TerrainTexture ? static_cast<float>(m_MapSize - 1) / m_TerrainTexture->GetWidth() : 1.0f;
@@ -506,7 +506,8 @@ void CMiniMapTexture::RenderFinalTexture(
deviceCommandContext->BeginPass();
// Draw territory boundaries
CTerritoryTexture& territoryTexture = g_Game->GetView()->GetTerritoryTexture();
CTerritoryTexture& territoryTexture =
g_Renderer.GetSceneRenderer().GetScene().GetTerritoryTexture();
deviceCommandContext->SetTexture(
shader->GetBindingSlot(str_baseTex), territoryTexture.GetTexture());