From f1234a9e26e5a621ce44e2612b8bcb522e1aca47 Mon Sep 17 00:00:00 2001 From: sprunk Date: Mon, 1 Apr 2024 02:01:52 +0200 Subject: [PATCH] Fix scar indices --- rts/Rendering/Env/Decals/GroundDecalHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rts/Rendering/Env/Decals/GroundDecalHandler.cpp b/rts/Rendering/Env/Decals/GroundDecalHandler.cpp index b805f9ebab..93921089be 100644 --- a/rts/Rendering/Env/Decals/GroundDecalHandler.cpp +++ b/rts/Rendering/Env/Decals/GroundDecalHandler.cpp @@ -549,7 +549,7 @@ void CGroundDecalHandler::AddExplosion(AddExplosionInfo&& ei) static std::vector validScarIndices; validScarIndices.clear(); for (auto scarIdx : vi.scarIdcs) { - if (scarIdx < 1 || scarIdx > maxUniqueScars - 1) + if (scarIdx < 1 || scarIdx > maxUniqueScars) // these are raw from Lua, so remember the +1 compared to C++ continue; validScarIndices.emplace_back(scarIdx);