Skip to content

Commit

Permalink
Fix scar indices
Browse files Browse the repository at this point in the history
  • Loading branch information
sprunk committed Apr 1, 2024
1 parent 83d7dd0 commit f1234a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rts/Rendering/Env/Decals/GroundDecalHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ void CGroundDecalHandler::AddExplosion(AddExplosionInfo&& ei)
static std::vector<int> 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);
Expand Down

0 comments on commit f1234a9

Please sign in to comment.