From 03b995c6efb4b6b559b61dd0f789b16c0d8b474f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sun, 2 Feb 2020 16:51:33 +0300 Subject: Some fixes and some cosmetic things --- src/render/Renderer.cpp | 8 ++++---- src/render/VisibilityPlugins.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/render') diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 78a4e5b4..ff9f5755 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -413,7 +413,7 @@ CRenderer::SetupEntityVisibility(CEntity *ent) // Make sure our atomic uses the right geometry and not // that of an atomic for another draw distance. if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj)) - RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0); + RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) mi->IncreaseAlpha(); if(ent->m_rwObject == nil || !ent->bIsVisible) return VIS_INVISIBLE; @@ -463,7 +463,7 @@ CRenderer::SetupEntityVisibility(CEntity *ent) assert(ent->m_rwObject); RpAtomic *rwobj = (RpAtomic*)ent->m_rwObject; if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj)) - RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0); + RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) mi->IncreaseAlpha(); if(ent->m_rwObject == nil || !ent->bIsVisible) return VIS_INVISIBLE; @@ -528,7 +528,7 @@ CRenderer::SetupBigBuildingVisibility(CEntity *ent) // Make sure our atomic uses the right geometry and not // that of an atomic for another draw distance. if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj)) - RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0); + RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) if(!ent->IsVisibleComplex()) return 0; if(mi->m_drawLast){ @@ -558,7 +558,7 @@ CRenderer::SetupBigBuildingVisibility(CEntity *ent) assert(ent->m_rwObject); RpAtomic *rwobj = (RpAtomic*)ent->m_rwObject; if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj)) - RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), 0); + RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) if(ent->IsVisibleComplex()) CVisibilityPlugins::InsertEntityIntoSortedList(ent, dist); return 0; diff --git a/src/render/VisibilityPlugins.cpp b/src/render/VisibilityPlugins.cpp index bbaa08ce..e01bbb92 100644 --- a/src/render/VisibilityPlugins.cpp +++ b/src/render/VisibilityPlugins.cpp @@ -248,7 +248,7 @@ CVisibilityPlugins::RenderFadingAtomic(RpAtomic *atomic, float camdist) RpGeometrySetFlags(geo, flags | rpGEOMETRYMODULATEMATERIALCOLOR); RpGeometryForAllMaterials(geo, SetAlphaCB, (void*)alpha); if(geo != RpAtomicGetGeometry(atomic)) - RpAtomicSetGeometry(atomic, geo, 0); + RpAtomicSetGeometry(atomic, geo, rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) AtomicDefaultRenderCallBack(atomic); RpGeometryForAllMaterials(geo, SetAlphaCB, (void*)255); RpGeometrySetFlags(geo, flags); -- cgit v1.2.3 From f1863676bbd3d99d70ab3160dad325d851550567 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Tue, 4 Feb 2020 22:05:17 +0200 Subject: CullZone fix --- src/render/VisibilityPlugins.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/render') diff --git a/src/render/VisibilityPlugins.cpp b/src/render/VisibilityPlugins.cpp index e01bbb92..74cd2590 100644 --- a/src/render/VisibilityPlugins.cpp +++ b/src/render/VisibilityPlugins.cpp @@ -44,7 +44,7 @@ CVisibilityPlugins::Initialise(void) m_alphaList.Init(20); m_alphaList.head.item.sort = 0.0f; m_alphaList.tail.item.sort = 100000000.0f; - m_alphaEntityList.Init(350); // TODO: set back to 150 when things are fixed + m_alphaEntityList.Init(150); m_alphaEntityList.head.item.sort = 0.0f; m_alphaEntityList.tail.item.sort = 100000000.0f; } -- cgit v1.2.3