summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-05 13:48:35 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-05 13:48:35 +0200
commite9b334d7bf270682f83c5c18b2d85a25703c1a2d (patch)
treebaa7ed00dedd2b09f99a2bb4958d2837ef6a8da6 /src/render
parentSetPosition, final part (diff)
downloadre3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar.gz
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar.bz2
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar.lz
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar.xz
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.tar.zst
re3-e9b334d7bf270682f83c5c18b2d85a25703c1a2d.zip
Diffstat (limited to '')
-rw-r--r--src/render/Renderer.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index cb2cb5b7..4325b78a 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -91,9 +91,7 @@ CRenderer::RenderOneRoad(CEntity *e)
if(gbDontRenderBuildings)
return;
if(gbShowCollisionPolys)
- CCollision::DrawColModel_Coloured(e->GetMatrix(),
- *CModelInfo::GetModelInfo(e->m_modelIndex)->GetColModel(),
- e->m_modelIndex);
+ CCollision::DrawColModel_Coloured(e->GetMatrix(), *CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(), e->GetModelIndex());
else
e->Render();
}
@@ -109,9 +107,7 @@ CRenderer::RenderOneNonRoad(CEntity *e)
#ifndef MASTER
if(gbShowCollisionPolys){
if(!e->IsVehicle()){
- CCollision::DrawColModel_Coloured(e->GetMatrix(),
- *CModelInfo::GetModelInfo(e->m_modelIndex)->GetColModel(),
- e->m_modelIndex);
+ CCollision::DrawColModel_Coloured(e->GetMatrix(), *CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(), e->GetModelIndex());
return;
}
}else if(e->IsBuilding()){
@@ -332,7 +328,7 @@ enum Visbility
int32
CRenderer::SetupEntityVisibility(CEntity *ent)
{
- CSimpleModelInfo *mi = (CSimpleModelInfo*)CModelInfo::GetModelInfo(ent->m_modelIndex);
+ CSimpleModelInfo *mi = (CSimpleModelInfo *)CModelInfo::GetModelInfo(ent->GetModelIndex());
CTimeModelInfo *ti;
int32 other;
float dist;
@@ -482,7 +478,7 @@ CRenderer::SetupEntityVisibility(CEntity *ent)
int32
CRenderer::SetupBigBuildingVisibility(CEntity *ent)
{
- CSimpleModelInfo *mi = (CSimpleModelInfo*)CModelInfo::GetModelInfo(ent->m_modelIndex);
+ CSimpleModelInfo *mi = (CSimpleModelInfo *)CModelInfo::GetModelInfo(ent->GetModelIndex());
CTimeModelInfo *ti;
int32 other;
@@ -1147,7 +1143,7 @@ CRenderer::SortBIGBuildingsForSectorList(CPtrList *list)
bool
CRenderer::ShouldModelBeStreamed(CEntity *ent)
{
- CSimpleModelInfo *mi = (CSimpleModelInfo*)CModelInfo::GetModelInfo(ent->m_modelIndex);
+ CSimpleModelInfo *mi = (CSimpleModelInfo *)CModelInfo::GetModelInfo(ent->GetModelIndex());
float dist = (ent->GetPosition() - ms_vecCameraPosition).Magnitude();
if(mi->m_noFade)
return dist - STREAM_DISTANCE < mi->GetLargestLodDistance();