diff --git a/code/defines/procs/gamehelpers.dm b/code/defines/procs/gamehelpers.dm index f74c7d9c1c3..069daa7fae2 100644 --- a/code/defines/procs/gamehelpers.dm +++ b/code/defines/procs/gamehelpers.dm @@ -51,17 +51,17 @@ /proc/circleview(center=usr,radius=3) var/turf/centerturf = get_turf(center) - var/list/turfs = new/list() + var/list/atoms = new/list() var/rsq = radius * (radius+0.5) - for(var/atom/T in view(radius, centerturf)) - var/dx = T.x - centerturf.x - var/dy = T.y - centerturf.y + for(var/atom/A in view(radius, centerturf)) + var/dx = A.x - centerturf.x + var/dy = A.y - centerturf.y if(dx*dx + dy*dy <= rsq) - turfs += T + atoms += A //turfs += centerturf - return turfs + return atoms /proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj) var/dx = Loc1.x - Loc2.x @@ -84,7 +84,7 @@ turfs += T return turfs -/proc/circleviewturfs(center=usr,radius=3) +/proc/circleviewturfs(center=usr,radius=3) //Is there even a diffrence between this proc and circlerangeturfs()? var/turf/centerturf = get_turf(center) var/list/turfs = new/list() diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 2232f91c36a..eba12f2f31a 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -26,10 +26,10 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa var/list/fTurfs = list() //Holds turfs to loop through for mobs to flash. (Hehehe, dirty) if(roundExplosions) - fTurfs = circlerange(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range)) - dTurfs = circlerange(epicenter,devastation_range) - hTurfs = circlerange(epicenter,heavy_impact_range) - dTurfs - lTurfs = circlerange(epicenter,light_impact_range) - dTurfs - hTurfs + fTurfs = circlerangeturfs(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range)) + dTurfs = circlerangeturfs(epicenter,devastation_range) + hTurfs = circlerangeturfs(epicenter,heavy_impact_range) - dTurfs + lTurfs = circlerangeturfs(epicenter,light_impact_range) - dTurfs - hTurfs else fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range)) dTurfs = range(epicenter,devastation_range)