mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
Cleans up and uses less area checks, relying more on lastarea.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2949 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -147,8 +147,7 @@
|
||||
if(W.loc == my_target) break
|
||||
sleep(2)
|
||||
|
||||
var/area/a = get_area(usr.loc)
|
||||
if((istype(usr.loc, /turf/space)) || (a.has_gravity == 0))
|
||||
if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0))
|
||||
user.inertia_dir = get_dir(target, user)
|
||||
step(user, user.inertia_dir)
|
||||
|
||||
|
||||
@@ -64,9 +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)
|
||||
|
||||
|
||||
+3
-3
@@ -82,9 +82,9 @@
|
||||
/turf/Entered(atom/movable/M as mob|obj)
|
||||
var/loopsanity = 10
|
||||
if(ismob(M))
|
||||
|
||||
var/area/a = get_area(M.loc)
|
||||
if(a.has_gravity == 0)
|
||||
if(!M:lastarea)
|
||||
M:lastarea = get_area(M.loc)
|
||||
if(M:lastarea.has_gravity == 0)
|
||||
inertial_drift(M)
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user