Skip to content

Commit

Permalink
Fixed endless loop bug on far-away synthetic aircraft
Browse files Browse the repository at this point in the history
  • Loading branch information
TwinFan committed Sep 8, 2024
1 parent b42343a commit bc191a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Src/LTSynthetic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ bool SyntheticConnection::ProcessFetchedData ()

// Only process planes in search distance
// We keep the data in memory, just in case we come back, but we don't feed data for unneeded planes
if (parkDat.pos.distRoughSqr(posCam) > distSearchSqr)
if (parkDat.pos.distRoughSqr(posCam) > distSearchSqr) {
++i; // next plane
continue;
}

// Find the related flight data
std::unique_lock<std::mutex> mapLock (mapFdMutex); // lock the entire map
Expand Down

0 comments on commit bc191a4

Please sign in to comment.