Renderer fix

This commit is contained in:
Sergeanur 2020-11-22 23:11:55 +02:00
parent f010777e58
commit c814a0a1a6

View file

@ -570,7 +570,7 @@ CRenderer::SetupBigBuildingVisibility(CEntity *ent)
// that of an atomic for another draw distance. // that of an atomic for another draw distance.
if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj)) if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj))
RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?)
if(!ent->IsVisibleComplex()) if (!ent->IsVisible() || !ent->GetIsOnScreenComplex())
return VIS_INVISIBLE; return VIS_INVISIBLE;
if(mi->m_drawLast){ if(mi->m_drawLast){
CVisibilityPlugins::InsertEntityIntoSortedList(ent, dist); CVisibilityPlugins::InsertEntityIntoSortedList(ent, dist);
@ -600,7 +600,7 @@ CRenderer::SetupBigBuildingVisibility(CEntity *ent)
RpAtomic *rwobj = (RpAtomic*)ent->m_rwObject; RpAtomic *rwobj = (RpAtomic*)ent->m_rwObject;
if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj)) if(RpAtomicGetGeometry(a) != RpAtomicGetGeometry(rwobj))
RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?) RpAtomicSetGeometry(rwobj, RpAtomicGetGeometry(a), rpATOMICSAMEBOUNDINGSPHERE); // originally 5 (mistake?)
if(ent->IsVisibleComplex()) if (ent->IsVisible() && ent->GetIsOnScreenComplex())
CVisibilityPlugins::InsertEntityIntoSortedList(ent, dist); CVisibilityPlugins::InsertEntityIntoSortedList(ent, dist);
return VIS_INVISIBLE; return VIS_INVISIBLE;
} }