From 11720568336fcba184d14a254781b660d09c0a21 Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 2 Dec 2020 10:39:23 +0100 Subject: cam lod dist fix --- src/control/PathFind.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/control') diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp index 41dc735f..e10693eb 100644 --- a/src/control/PathFind.cpp +++ b/src/control/PathFind.cpp @@ -1766,10 +1766,18 @@ CPathFind::TestCoorsCloseness(CVector target, uint8 type, CVector start) DoPathSearch(type, start, -1, target, pNodeList, &DummyResult, 32, nil, &dist, 999999.88f, -1); else 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 < 150.0f*TheCamera.GenerationDistMultiplier; + else + return dist < 100.0f*TheCamera.GenerationDistMultiplier; +#else if(type == PATH_CAR) return dist < 150.0f; else return dist < 100.0f; +#endif } void -- cgit v1.2.3