mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
Removes the approximations cheap_pythag and cheap_hypotenuse, since they're anything *but* cheap
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
//build affected area list
|
||||
for(var/turf/T in view(range, location))
|
||||
//cull turfs to circle
|
||||
if(cheap_pythag(T.x - location.x, T.y - location.y) <= range)
|
||||
if(sqrt((T.x - location.x)**2 + (T.y - location.y)**2) <= range)
|
||||
targetTurfs += T
|
||||
|
||||
//make secondary list for reagents that affect walls
|
||||
@@ -145,7 +145,7 @@
|
||||
if(istype(A, /obj/effect/effect/smoke/chem)) //skip the item if it is chem smoke
|
||||
continue
|
||||
else if(istype(A, /mob))
|
||||
var/dist = cheap_pythag(T.x - location.x, T.y - location.y)
|
||||
var/dist = sqrt((T.x - location.x)**2 + (T.y - location.y)**2)
|
||||
if(!dist)
|
||||
dist = 1
|
||||
R.reaction_mob(A, volume = R.volume / dist)
|
||||
|
||||
Reference in New Issue
Block a user