This commit is contained in:
kevinz000
2020-02-27 20:06:52 -07:00
parent f4e49f339b
commit 045d5b2dbf
9 changed files with 25 additions and 24 deletions

View File

@@ -88,7 +88,7 @@
var/they_can_move = TRUE
if(isliving(M))
var/mob/living/L = M
they_can_move = L.mobility_flags & MOBILITY_MOVE
they_can_move = CHECK_MOBILITY(L, MOBILITY_MOVE)
//Also spread diseases
for(var/thing in diseases)
var/datum/disease/D = thing
@@ -663,7 +663,7 @@
// This shouldn't give clickdelays sometime (e.g. going out of a mech/unwelded and unlocked locker/disposals bin/etc) but there's so many overrides that I am not going to bother right now.
return TRUE
if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE))
if(CHECK_MOBILITY(src, MOBILITY_MOVE))
if(on_fire)
resist_fire() //stop, drop, and roll
// Give clickdelay
@@ -704,7 +704,7 @@
/mob/living/do_resist_grab(moving_resist, forced, silent = FALSE)
. = ..()
if(pulledby.grab_state)
if(CHECK_BITFIELD(mobility_flags, MOBILITY_STAND) && prob(30/pulledby.grab_state))
if(CHECK_MOBILITY(src, MOBILITY_STAND) && prob(30/pulledby.grab_state))
visible_message("<span class='danger'>[src] has broken free of [pulledby]'s grip!</span>")
pulledby.stop_pulling()
return TRUE
@@ -1184,4 +1184,4 @@
reagents.add_reagent_list(healing_chems)
/mob/living/canface()
return ..() && CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE)
return ..() && CHECK_MOBILITY(src, MOBILITY_MOVE)

View File

@@ -41,7 +41,7 @@
AIproc = 1
while(AIproc && stat != DEAD && (attacked || hungry || rabid || buckled))
if(!(mobility_flags & MOBILITY_MOVE)) //also covers buckling. Not sure why buckled is in the while condition if we're going to immediately break, honestly
if(!CHECK_MOBILITY(src, MOBILITY_MOVE)) //also covers buckling. Not sure why buckled is in the while condition if we're going to immediately break, honestly
break
if(!Target || client)
@@ -291,7 +291,7 @@
Discipline--
if(!client)
if(!CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE))
if(!CHECK_MOBILITY(src, MOBILITY_MOVE))
return
if(buckled)
@@ -376,13 +376,13 @@
if (Leader)
if(holding_still)
holding_still = max(holding_still - 1, 0)
else if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) && isturf(loc))
else if(CHECK_MOBILITY(src, MOBILITY_MOVE) && isturf(loc))
step_to(src, Leader)
else if(hungry)
if (holding_still)
holding_still = max(holding_still - hungry, 0)
else if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) && isturf(loc) && prob(50))
else if(CHECK_MOBILITY(src, MOBILITY_MOVE) && isturf(loc) && prob(50))
step(src, pick(GLOB.cardinals))
else
@@ -390,7 +390,7 @@
holding_still = max(holding_still - 1, 0)
else if (docile && pulledby)
holding_still = 10
else if(CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) && isturf(loc) && prob(33))
else if(CHECK_MOBILITY(src, MOBILITY_MOVE) && isturf(loc) && prob(33))
step(src, pick(GLOB.cardinals))
else if(!AIproc)
INVOKE_ASYNC(src, .proc/AIprocess)

View File

@@ -665,6 +665,8 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
return FALSE
if(anchored)
return FALSE
if(!CHECK_MOBILITY(src, MOBILITY_MOVE))
return FALSE
if(notransform)
return FALSE
if(restrained())