TG: Cleans up and uses less area checks, relying more on lastarea.

Revision: r2949
Author: 	 VivianFoxfoot
This commit is contained in:
Ren Erthilo
2012-04-15 17:54:55 +01:00
parent d713e59699
commit 3963aa794f
4 changed files with 12 additions and 9 deletions
+3 -2
View File
@@ -64,8 +64,9 @@
item.layer = initial(item.layer)
src.visible_message("\red [src] has thrown [item].")
var/area/a = get_area(src.loc)
if((istype(src.loc, /turf/space)) || (a.has_gravity == 0))
if(!src.lastarea)
src.lastarea = get_area(src.loc)
if((istype(src.loc, /turf/space)) || (src.lastarea.has_gravity == 0))
src.inertia_dir = get_dir(target, src)
step(src, inertia_dir)
+1
View File
@@ -80,6 +80,7 @@
/turf/Entered(atom/movable/M as mob|obj)
// var/loopsanity = 100
if(ismob(M))
if(!M:lastarea)
M:lastarea = get_area(M.loc)