have to be on a valid turf (Not space) to be able to crawl (#16932)

* have to be on a valid turf (Not space) to be able to crawl

* adds the isfloor macro, crawling now uses it.
This commit is contained in:
MadmanMartian
2017-12-31 17:36:29 +00:00
committed by Pieter-Jan Briers
parent a3b2a54cba
commit ccec3293cf
2 changed files with 3 additions and 1 deletions

View File

@@ -185,6 +185,8 @@
#define isPDA(A) (istype(A, /obj/item/device/pda)) #define isPDA(A) (istype(A, /obj/item/device/pda))
#define isfloor(A) (istype(A, /turf/simulated/floor) || istype(A, /turf/unsimulated/floor))
//Macros for antags //Macros for antags
#define isvampire(H) ((H.mind in ticker.mode.vampires) || H.mind && H.mind.vampire) #define isvampire(H) ((H.mind in ticker.mode.vampires) || H.mind && H.mind.vampire)

View File

@@ -52,7 +52,7 @@
else else
A.attack_stump(src, params) A.attack_stump(src, params)
if(src.lying && !(isUnconscious() || stunned || paralysis) && check_crawl_ability() && istype(A, /turf/simulated) && proximity && !pulledby && !locked_to && !client.move_delayer.blocked()) if(src.lying && !(isUnconscious() || stunned || paralysis) && check_crawl_ability() && isfloor(A) && isfloor(get_turf(src)) && proximity && !pulledby && !locked_to && !client.move_delayer.blocked())
Move(A, get_dir(src,A)) Move(A, get_dir(src,A))
delayNextMove(movement_delay()*3,additive=1) delayNextMove(movement_delay()*3,additive=1)