diff --git a/pokemongo_bot/walkers/polyline_generator.py b/pokemongo_bot/walkers/polyline_generator.py index 02f2f70388..80ab744d13 100644 --- a/pokemongo_bot/walkers/polyline_generator.py +++ b/pokemongo_bot/walkers/polyline_generator.py @@ -27,7 +27,7 @@ def cached_polyline(origin, destination, speed, google_map_api_key=None): abs_offset = haversine.haversine(tuple(origin), PolylineObjectHandler._cache.get_last_pos())*1000 else: abs_offset = float("inf") - is_old_cache = lambda : abs_offset < 8 # Consider cache old if we identified an offset more then 8 m + is_old_cache = lambda : abs_offset > 8 # Consider cache old if we identified an offset more then 8 m new_dest_set = lambda : tuple(destination) != PolylineObjectHandler._cache.destination if PolylineObjectHandler._run and (not is_old_cache()):