diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-02-23 23:58:56 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-02-23 23:58:56 +0000 |
commit | 27e1da72e5ff30d4e5b94bd1d8a674bf1e645222 (patch) | |
tree | e1b2243d3d050e7618b6a330c5a89ad00cf3d9a5 /game | |
parent | Add GeoData deformation perf test (diff) | |
download | ilt-27e1da72e5ff30d4e5b94bd1d8a674bf1e645222.tar.bz2 ilt-27e1da72e5ff30d4e5b94bd1d8a674bf1e645222.tar.xz ilt-27e1da72e5ff30d4e5b94bd1d8a674bf1e645222.zip |
Improve number of segments in LinkCurve bases
Diffstat (limited to 'game')
-rw-r--r-- | game/network/link.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/game/network/link.cpp b/game/network/link.cpp index 61e8771..c84524c 100644 --- a/game/network/link.cpp +++ b/game/network/link.cpp @@ -93,7 +93,7 @@ LinkCurve::getBase(RelativeDistance width) const { const auto start = ends.front().node->pos; const auto end = ends.back().node->pos; - const auto segs = std::ceil(15.F * arc.length()); + const auto segs = std::ceil(std::sqrt(radius) * 0.02F * arc.length()); const auto step {glm::vec<2, RelativeDistance> {arc.length(), end.z - start.z} / segs}; auto segCount = static_cast<size_t>(segs) + 1; |