mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 23:53:47 +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:
@@ -166,8 +166,10 @@
|
||||
//if(istype(mob.loc, /turf/space) || (mob.flags & NOGRAV))
|
||||
// if(!mob.Process_Spacemove(0)) return 0
|
||||
|
||||
var/area/a = get_area(mob.loc)
|
||||
if((istype(mob.loc, /turf/space)) || (a.has_gravity == 0))
|
||||
if(!mob.lastarea)
|
||||
mob.lastarea = get_area(mob.loc)
|
||||
|
||||
if((istype(mob.loc, /turf/space)) || (mob.lastarea.has_gravity == 0))
|
||||
if(!mob.Process_Spacemove(0)) return 0
|
||||
|
||||
|
||||
@@ -344,16 +346,13 @@
|
||||
if(istype(turf,/turf/space))
|
||||
continue
|
||||
|
||||
|
||||
var/area/a = get_area(turf)
|
||||
|
||||
if(istype(src,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to.
|
||||
if((istype(turf,/turf/simulated/floor)) && (a.has_gravity == 0) && !(istype(src:shoes, /obj/item/clothing/shoes/magboots) && (src:shoes:flags & NOSLIP)))
|
||||
if((istype(turf,/turf/simulated/floor)) && (src.lastarea.has_gravity == 0) && !(istype(src:shoes, /obj/item/clothing/shoes/magboots) && (src:shoes:flags & NOSLIP)))
|
||||
continue
|
||||
|
||||
|
||||
else
|
||||
if((istype(turf,/turf/simulated/floor)) && (a.has_gravity == 0)) // No one else gets a chance.
|
||||
if((istype(turf,/turf/simulated/floor)) && (src.lastarea.has_gravity == 0)) // No one else gets a chance.
|
||||
continue
|
||||
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
var/starting_loc = pick(newplayer_start)
|
||||
if(!starting_loc) starting_loc = locate(1,1,1)
|
||||
loc = starting_loc
|
||||
lastarea = starting_loc
|
||||
|
||||
sight |= SEE_TURFS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user