ID:155314
 
I'm trying to set up a weapon arc that covers 120 degrees of a circle around the player in any direction. I've already got the circle calculations, thanks to a comment on forum_account's site and a bit of fiddling. I just need the weapon to arc within that circle.

mob/proc/halfcircle(var/turf/clicked, radius = 100)
. = list()
var/rad_sq = radius * radius
for(var/mob/m in front(get_dir(src,clicked)))
var/dist_sq = (m.px - px) * (m.px - px) + (m.py - py) * (m.py - py)
if(dist_sq < rad_sq)
. += m


I've also modified front to cover the blocks adjacent to their original coverage, and added diagonals.

Anyone mind helping me out with this?
No one knows? Well that sucks.