better cam lod dist fix

This commit is contained in:
aap 2020-12-02 10:38:27 +01:00
parent 83bbb631d1
commit fba657ff0c
2 changed files with 15 additions and 7 deletions

View File

@ -1649,10 +1649,18 @@ CPathFind::TestCoorsCloseness(CVector target, uint8 type, CVector start)
DoPathSearch(type, start, -1, target, pNodeList, &DummyResult, 32, nil, &dist, 999999.88f, -1); DoPathSearch(type, start, -1, target, pNodeList, &DummyResult, 32, nil, &dist, 999999.88f, -1);
else else
DoPathSearch(type, start, -1, target, nil, &DummyResult2, 0, nil, &dist, 50.0f, -1); DoPathSearch(type, start, -1, target, nil, &DummyResult2, 0, nil, &dist, 50.0f, -1);
#ifdef FIX_BUGS
// dist has GenerationDistMultiplier as a factor, so our reference dist should have it too
if(type == PATH_CAR)
return dist < 160.0f*TheCamera.GenerationDistMultiplier;
else
return dist < 100.0f*TheCamera.GenerationDistMultiplier;
#else
if(type == PATH_CAR) if(type == PATH_CAR)
return dist < 160.0f; return dist < 160.0f;
else else
return dist < 100.0f; return dist < 100.0f;
#endif
} }
void void

View File

@ -713,14 +713,14 @@ CCamera::Process(void)
DistanceToWater = CWaterLevel::CalcDistanceToWater(GetPosition().x, GetPosition().y); DistanceToWater = CWaterLevel::CalcDistanceToWater(GetPosition().x, GetPosition().y);
// LOD dist // LOD dist
if(!CCutsceneMgr::IsRunning() || CCutsceneMgr::UseLodMultiplier()) if(!CCutsceneMgr::IsRunning() || CCutsceneMgr::UseLodMultiplier()){
LODDistMultiplier = 70.0f/CDraw::GetFOV() * CDraw::GetAspectRatio()/(4.0f/3.0f); LODDistMultiplier = 70.0f/CDraw::GetFOV();
else #ifndef FIX_BUGS
LODDistMultiplier = 1.0f; // makes no sense and gone in VC
#ifdef FIX_BUGS LODDistMultiplier *= CDraw::GetAspectRatio()/(4.0f/3.0f);
// from VC. to high values bug out spawns
LODDistMultiplier = Min(LODDistMultiplier, 2.2f);
#endif #endif
}else
LODDistMultiplier = 1.0f;
#if GTA_VERSION > GTA3_PS2_160 #if GTA_VERSION > GTA3_PS2_160
GenerationDistMultiplier = LODDistMultiplier; GenerationDistMultiplier = LODDistMultiplier;
LODDistMultiplier *= CRenderer::ms_lodDistScale; LODDistMultiplier *= CRenderer::ms_lodDistScale;