Skip to content

Commit

Permalink
fix particles not being limited for long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
OgelGames committed Jun 28, 2023
1 parent a4bbb7e commit 690402e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ local function make_line(pos1, pos2, color, name, time, density)
return minetest.add_particlespawner({
playername = name,
time = time,
amount = math.ceil(distance * density * 3.0),
amount = math.ceil(math.min(distance, 10.0) * density * 3.0),
minpos = pos1,
maxpos = pos1,
minvel = vel,
Expand Down

0 comments on commit 690402e

Please sign in to comment.