More while loop stuff, removed shitloads of unnecessary curly brackets in the map reader, fixed ED-209 projectiles

This commit is contained in:
SkyMarshal
2012-06-22 14:10:48 -07:00
parent 668f81c329
commit 616be6eed8
16 changed files with 133 additions and 194 deletions
@@ -167,20 +167,15 @@
if ((O.client && !( O.blinded )))
O << "\red [src] spits neurotoxin at [target]!"
//I'm not motivated enough to revise this. Prjectile code in general needs update.
var/turf/T = loc
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
var/turf/T = get_turf(src)
var/turf/U = (istype(target, /atom/movable) ? get_turf(target) : target)
if(!U || !T)
return
while(U && !istype(U,/turf))
U = U.loc
if(!istype(T, /turf))
if(!istype(T, /turf) || !istype(U,/turf))
return
if (U == T)
usr.bullet_act(src, src.get_organ_target())
return
if(!istype(U, /turf))
return
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(usr.loc)