summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-07-21 11:11:58 +0200
committeraap <aap@papnet.eu>2020-07-21 11:12:10 +0200
commitd4d6290403ffbbd0bf7321866cb532da23ef2847 (patch)
tree9d9d0965262ba03ac7a78056b6a878af972f4416
parenta cute mistake (diff)
downloadre3-d4d6290403ffbbd0bf7321866cb532da23ef2847.tar
re3-d4d6290403ffbbd0bf7321866cb532da23ef2847.tar.gz
re3-d4d6290403ffbbd0bf7321866cb532da23ef2847.tar.bz2
re3-d4d6290403ffbbd0bf7321866cb532da23ef2847.tar.lz
re3-d4d6290403ffbbd0bf7321866cb532da23ef2847.tar.xz
re3-d4d6290403ffbbd0bf7321866cb532da23ef2847.tar.zst
re3-d4d6290403ffbbd0bf7321866cb532da23ef2847.zip
-rw-r--r--src/render/Renderer.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 9ebbc1bb..d02ecec5 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -311,7 +311,11 @@ enum Visbility
VIS_STREAMME
};
+#ifdef FIX_BUGS
+#define LOD_DISTANCE (300.0f*TheCamera.LODDistMultiplier)
+#else
#define LOD_DISTANCE 300.0f
+#endif
#define FADE_DISTANCE 20.0f
#define STREAM_DISTANCE 30.0f
@@ -674,14 +678,7 @@ CRenderer::ScanWorld(void)
poly[2].y = CWorld::GetSectorY(vectors[CORNER_LOD_RIGHT].y);
ScanSectorPoly(poly, 3, ScanSectorList_Subway);
}else{
- if(f <= LOD_DISTANCE){
- poly[0].x = CWorld::GetSectorX(vectors[CORNER_CAM].x);
- poly[0].y = CWorld::GetSectorY(vectors[CORNER_CAM].y);
- poly[1].x = CWorld::GetSectorX(vectors[CORNER_FAR_TOPLEFT].x);
- poly[1].y = CWorld::GetSectorY(vectors[CORNER_FAR_TOPLEFT].y);
- poly[2].x = CWorld::GetSectorX(vectors[CORNER_FAR_TOPRIGHT].x);
- poly[2].y = CWorld::GetSectorY(vectors[CORNER_FAR_TOPRIGHT].y);
- }else{
+ if(f > LOD_DISTANCE){
// priority
poly[0].x = CWorld::GetSectorX(vectors[CORNER_CAM].x);
poly[0].y = CWorld::GetSectorY(vectors[CORNER_CAM].y);
@@ -698,8 +695,16 @@ CRenderer::ScanWorld(void)
poly[1].y = CWorld::GetSectorY(vectors[CORNER_LOD_LEFT].y);
poly[2].x = CWorld::GetSectorX(vectors[CORNER_LOD_RIGHT].x);
poly[2].y = CWorld::GetSectorY(vectors[CORNER_LOD_RIGHT].y);
+ ScanSectorPoly(poly, 3, ScanSectorList);
+ }else{
+ poly[0].x = CWorld::GetSectorX(vectors[CORNER_CAM].x);
+ poly[0].y = CWorld::GetSectorY(vectors[CORNER_CAM].y);
+ poly[1].x = CWorld::GetSectorX(vectors[CORNER_FAR_TOPLEFT].x);
+ poly[1].y = CWorld::GetSectorY(vectors[CORNER_FAR_TOPLEFT].y);
+ poly[2].x = CWorld::GetSectorX(vectors[CORNER_FAR_TOPRIGHT].x);
+ poly[2].y = CWorld::GetSectorY(vectors[CORNER_FAR_TOPRIGHT].y);
+ ScanSectorPoly(poly, 3, ScanSectorList);
}
- ScanSectorPoly(poly, 3, ScanSectorList);
#ifdef NO_ISLAND_LOADING
ScanBigBuildingList(CWorld::GetBigBuildingList(LEVEL_INDUSTRIAL));
ScanBigBuildingList(CWorld::GetBigBuildingList(LEVEL_COMMERCIAL));