Skip to content

Commit

Permalink
Move the point where large spray sizes break further away
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Jan 31, 2024
1 parent 8166241 commit de13f63
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/spraycast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -214,22 +214,27 @@ function shared.spraycast(player, pos, dir, def)

if exceeds_left then
spread_offset(-1, 0)
elseif exceeds_right then
end
if exceeds_right then
spread_offset(1, 0)
end
if exceeds_top then
spread_offset(0, -1)
elseif exceeds_bottom then
end
if exceeds_bottom then
spread_offset(0, 1)
end

if exceeds_left and exceeds_top then
spread_offset(-1, -1)
elseif exceeds_left and exceeds_bottom then
end
if exceeds_left and exceeds_bottom then
spread_offset(-1, 1)
elseif exceeds_right and exceeds_top then
end
if exceeds_right and exceeds_top then
spread_offset(1, -1)
elseif exceeds_right and exceeds_bottom then
end
if exceeds_right and exceeds_bottom then
spread_offset(1, 1)
end
end
Expand Down

0 comments on commit de13f63

Please sign in to comment.