From cc10352def9a5dea0e940a4ed7f60b192559a9da Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Wed, 22 Oct 2025 17:27:51 +0200 Subject: [PATCH] Address comments --- apps/opencs/view/render/pathgrid.cpp | 2 +- components/nifosg/particle.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/opencs/view/render/pathgrid.cpp b/apps/opencs/view/render/pathgrid.cpp index 2a65001c86..989f5b6b1b 100644 --- a/apps/opencs/view/render/pathgrid.cpp +++ b/apps/opencs/view/render/pathgrid.cpp @@ -316,7 +316,7 @@ namespace CSVRender for (size_t row = source->mEdges.size(); row > 0; --row) { commands.push( - new CSMWorld::DeleteNestedCommand(*model, idString, static_cast(row), parentColumn)); + new CSMWorld::DeleteNestedCommand(*model, idString, static_cast(row - 1), parentColumn)); } } } diff --git a/components/nifosg/particle.cpp b/components/nifosg/particle.cpp index a554c986de..f64116eb9c 100644 --- a/components/nifosg/particle.cpp +++ b/components/nifosg/particle.cpp @@ -487,8 +487,7 @@ namespace NifOsg } else { - int randomIndex - = static_cast(std::floor(Misc::Rng::rollClosedProbability() * (mTargets.size() - 1))); + size_t randomIndex = Misc::Rng::rollDice(mTargets.size()); recIndex = mTargets[randomIndex]; }