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:
parent
d1c9e96f87
commit
95106b2d9b
@ -355,7 +355,7 @@ void CLOSTexture::RecomputeTexture(Renderer::Backend::IDeviceCommandContext* dev
|
||||
std::unique_ptr<u8[]> losData = std::make_unique<u8[]>(
|
||||
dataSize * m_TextureFormatStride);
|
||||
|
||||
CLosQuerier los(cmpRangeManager->GetLosQuerier(g_Game->GetSimulation2()->GetSimContext().GetCurrentDisplayedPlayer()));
|
||||
CLosQuerier los(cmpRangeManager->GetLosQuerier(m_Simulation.GetSimContext().GetCurrentDisplayedPlayer()));
|
||||
|
||||
GenerateBitmap(los, &losData[0], m_MapSize, m_MapSize, pitch);
|
||||
|
||||
|
@ -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());
|
||||
|
@ -610,7 +610,7 @@ void TerrainRenderer::RenderSimpleWater(
|
||||
GPU_SCOPED_LABEL(deviceCommandContext, "Render Simple Water");
|
||||
|
||||
const WaterManager& waterManager = g_Renderer.GetSceneRenderer().GetWaterManager();
|
||||
CLOSTexture& losTexture = g_Game->GetView()->GetLOSTexture();
|
||||
CLOSTexture& losTexture = g_Renderer.GetSceneRenderer().GetScene().GetLOSTexture();
|
||||
|
||||
const double time = waterManager.m_WaterTexTimer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user