From ae73927b67a94b7fcd5aafda4daf33955c7e5b67 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Tue, 7 Jan 2020 02:39:16 -0800 Subject: [PATCH] patches --- code/__DEFINES/status_effects.dm | 8 ++++++-- code/datums/status_effects/debuffs.dm | 2 +- code/modules/client/verbs/suicide.dm | 2 +- .../mob/living/carbon/alien/alien_defense.dm | 3 +-- .../carbon/alien/humanoid/update_icons.dm | 4 ++-- .../living/carbon/alien/larva/update_icons.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 2 +- .../mob/living/carbon/carbon_defense.dm | 2 +- code/modules/mob/living/living.dm | 6 ++++++ code/modules/mob/living/living_mobility.dm | 3 +-- .../mob/living/silicon/pai/pai_shell.dm | 3 +-- code/modules/mob/living/silicon/robot/robot.dm | 2 +- .../modules/mob/living/simple_animal/astral.dm | 1 - .../mob/living/simple_animal/friendly/cat.dm | 16 ++++++---------- .../mob/living/simple_animal/friendly/dog.dm | 7 +++---- .../modules/mob/living/simple_animal/parrot.dm | 2 +- .../mob/living/simple_animal/simple_animal.dm | 2 +- code/modules/mob/living/status_procs.dm | 18 +++++++++--------- code/modules/mob/mob_defines.dm | 2 +- code/modules/mob/status_procs.dm | 4 ++-- .../mob/living/carbon/human/human_movement.dm | 6 +++--- .../mob/living/silicon/robot/robot_movement.dm | 2 +- 22 files changed, 50 insertions(+), 49 deletions(-) diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index 6d52f4640c..5ad599ab45 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -38,9 +38,13 @@ // DEBUFFS // ///////////// -#define STATUS_EFFECT_STUN /datum/status_effect/incapacitating/stun //the affected is stunned +#define STATUS_EFFECT_STUN /datum/status_effect/incapacitating/stun //the affected is unable to move or use items -#define STATUS_EFFECT_KNOCKDOWN /datum/status_effect/incapacitating/knockdown //the affected is knocked down +#define STATUS_EFFECT_KNOCKDOWN /datum/status_effect/incapacitating/knockdown //the affected is unable to stand up + +#define STATUS_EFFECT_IMMOBILIZED /datum/status_effect/incapacitating/immobilized //the affected is unable to move + +#define STATUS_EFFECT_PARALYZED /datum/status_effect/incapacitating/paralyzed //the affected is unable to move, use items, or stand up. #define STATUS_EFFECT_UNCONSCIOUS /datum/status_effect/incapacitating/unconscious //the affected is unconscious diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 1bbd576d59..c0b9c49240 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -685,7 +685,7 @@ datum/status_effect/pacify var/mob/living/carbon/C = owner C.cure_trauma_type(/datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY) //clear previous hypnosis addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, hearing_args[HEARING_RAW_MESSAGE]), 10) - addtimer(CALLBACK(C, /mob/living.proc/_MOBILITYFLAGTEMPORARY_Stun, 60, TRUE, TRUE), 15) //Take some time to think about it + addtimer(CALLBACK(C, /mob/living.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it qdel(src) /datum/status_effect/spasms diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm index 2e643cc05d..ceba6ae605 100644 --- a/code/modules/client/verbs/suicide.dm +++ b/code/modules/client/verbs/suicide.dm @@ -221,7 +221,7 @@ /mob/living/carbon/canSuicide() if(!..()) return - if(IsStun() || IsKnockdown()) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide + if(!CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_MOVE|MOBILITY_USE)) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide to_chat(src, "You can't commit suicide while stunned! ((You can type Ghost instead however.))") return if(restrained()) diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm index bdc691ce49..14f1d0e76d 100644 --- a/code/modules/mob/living/carbon/alien/alien_defense.dm +++ b/code/modules/mob/living/carbon/alien/alien_defense.dm @@ -23,8 +23,7 @@ In all, this is a lot like the monkey code. /N if (INTENT_HELP) if(!recoveringstam) resting = 0 - AdjustStun(-60) - AdjustKnockdown(-60) + AdjustAllImmobility(-60) AdjustUnconscious(-60) AdjustSleeping(-100) visible_message("[M.name] nuzzles [src] trying to wake [p_them()] up!") diff --git a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm index ba7062aef4..8772013d66 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm @@ -4,7 +4,7 @@ for(var/I in overlays_standing) add_overlay(I) - var/asleep = IsSleeping() + var/asleep = _MOBILITYFLAGTEMPORARY_IsSleeping() if(stat == DEAD) //If we mostly took damage from fire if(fireloss > 125) @@ -17,7 +17,7 @@ else if(leap_on_click) icon_state = "alien[caste]_pounce" - else if(lying || resting || asleep) + else if(lying || !CHECK_BITFIELD(mobility_flags, MOBILITY_STAND) || asleep) icon_state = "alien[caste]_sleep" else if(mob_size == MOB_SIZE_LARGE) icon_state = "alien[caste]" diff --git a/code/modules/mob/living/carbon/alien/larva/update_icons.dm b/code/modules/mob/living/carbon/alien/larva/update_icons.dm index 9b762d1728..a4d5511059 100644 --- a/code/modules/mob/living/carbon/alien/larva/update_icons.dm +++ b/code/modules/mob/living/carbon/alien/larva/update_icons.dm @@ -16,7 +16,7 @@ icon_state = "larva[state]_cuff" else if(stat == UNCONSCIOUS || lying || resting) icon_state = "larva[state]_sleep" - else if(IsStun()) + else if(_MOBILTIYFLAGTEMPORARY_IsStun() || _MOBILITYFLAGTEMPORARY_IsParalyzed()) icon_state = "larva[state]_stun" else icon_state = "larva[state]" diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 7b4cd8a35d..5e1052505a 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -803,7 +803,7 @@ if(health <= HEALTH_THRESHOLD_DEAD && !HAS_TRAIT(src, TRAIT_NODEATH)) death() return - if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT))) + if(_MOBILITYFLAGTEMPORARY_IsUnconscious() || _MOBILITYFLAGTEMPORARY_IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT))) stat = UNCONSCIOUS blind_eyes(1) if(combatmode) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index b532cdeb51..5676e9dfd3 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -347,7 +347,7 @@ AdjustSleeping(-100, FALSE) if(recoveringstam) adjustStaminaLoss(-15) - else if(resting) + else set_resting(FALSE, FALSE) update_mobility() playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 02e398cb6a..a87510233c 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -359,6 +359,12 @@ /mob/living/incapacitated(ignore_restraints, ignore_grab) + if(stat) + return TRUE + if(!CHECK_BITFIELD(mobility_flags, MOBILITY_FLAGS_ANY_INTERACTION)) + if(!ignore_restraints && restrained(ignore_grab)) + return TRUE + return FALSE if(stat || IsUnconscious() || IsStun() || IsKnockdown() || recoveringstam || (!ignore_restraints && restrained(ignore_grab))) // CIT CHANGE - adds recoveringstam check here return TRUE diff --git a/code/modules/mob/living/living_mobility.dm b/code/modules/mob/living/living_mobility.dm index dd546fb61c..ec5f2e2c11 100644 --- a/code/modules/mob/living/living_mobility.dm +++ b/code/modules/mob/living/living_mobility.dm @@ -88,11 +88,10 @@ playsound(src, "bodyfall", 20, 1) return FALSE - -/* //Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. //Robots, animals and brains have their own version so don't worry about them /mob/living/proc/update_mobility() +/* var/stat_softcrit = stat == SOFT_CRIT var/stat_conscious = (stat == CONSCIOUS) || stat_softcrit var/conscious = !IsUnconscious() && stat_conscious && !HAS_TRAIT(src, TRAIT_DEATHCOMA) diff --git a/code/modules/mob/living/silicon/pai/pai_shell.dm b/code/modules/mob/living/silicon/pai/pai_shell.dm index 6577c26402..517ced2e7b 100644 --- a/code/modules/mob/living/silicon/pai/pai_shell.dm +++ b/code/modules/mob/living/silicon/pai/pai_shell.dm @@ -67,8 +67,7 @@ density = FALSE set_light(0) holoform = FALSE - if(resting) - lay_down() + set_resting(FALSE, TRUE) /mob/living/silicon/pai/proc/choose_chassis() if(!isturf(loc) && loc != card) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index a52289192b..1dafb3c550 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1021,7 +1021,7 @@ if(health <= -maxHealth) //die only once death() return - if(IsUnconscious() || _MOBILITYFLAGTEMPORARY_IsStun() || IsParalyze() || getOxyLoss() > maxHealth*0.5) + if(_MOBILITYFLAGTEMPORARY_IsUnconscious() || _MOBILITYFLAGTEMPORARY_IsStun() || _MOBILITYFLAGTEMPORARY_IsParalyze() || getOxyLoss() > maxHealth*0.5) if(stat == CONSCIOUS) stat = UNCONSCIOUS blind_eyes(1) diff --git a/code/modules/mob/living/simple_animal/astral.dm b/code/modules/mob/living/simple_animal/astral.dm index 3d0c335989..6a2bbfb830 100644 --- a/code/modules/mob/living/simple_animal/astral.dm +++ b/code/modules/mob/living/simple_animal/astral.dm @@ -32,7 +32,6 @@ /mob/living/simple_animal/astral/death() icon_state = "shade_dead" Stun(1000) - canmove = 0 friendly = "deads at" pseudo_death = TRUE incorporeal_move = 0 diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index bda309f7c7..0ae2dab749 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -41,7 +41,7 @@ /mob/living/simple_animal/pet/cat/update_canmove() ..() if(client && stat != DEAD) - if (resting) + if(!CHECK_BITFIELD(mobility_flags, MOBILITY_STAND)) icon_state = "[icon_living]_rest" collar_type = "[initial(collar_type)]_rest" else @@ -173,27 +173,24 @@ emote("me", EMOTE_VISIBLE, pick("stretches out for a belly rub.", "wags its tail.", "lies down.")) icon_state = "[icon_living]_rest" collar_type = "[initial(collar_type)]_rest" - resting = 1 - update_canmove() + set_resting(TRUE) else if (prob(1)) emote("me", EMOTE_VISIBLE, pick("sits down.", "crouches on its hind legs.", "looks alert.")) icon_state = "[icon_living]_sit" collar_type = "[initial(collar_type)]_sit" - resting = 1 - update_canmove() + set_resting(TRUE) else if (prob(1)) if (resting) emote("me", EMOTE_VISIBLE, pick("gets up and meows.", "walks around.", "stops resting.")) icon_state = "[icon_living]" collar_type = "[initial(collar_type)]" - resting = 0 - update_canmove() + set_resting(FALSE) else emote("me", EMOTE_VISIBLE, pick("grooms its fur.", "twitches its whiskers.", "shakes out its coat.")) //MICE! if((src.loc) && isturf(src.loc)) - if(!stat && !resting && !buckled) + if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled) for(var/mob/living/simple_animal/mouse/M in view(1,src)) if(!M.stat && Adjacent(M)) emote("me", EMOTE_VISIBLE, "splats \the [M]!") @@ -210,7 +207,7 @@ make_babies() - if(!stat && !resting && !buckled) + if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled) turns_since_scan++ if(turns_since_scan > 5) walk_to(src,0) @@ -320,7 +317,6 @@ if (pseudo_death == TRUE) //secret cat chem icon_state = "custom_cat_dead" Stun(1000) - canmove = 0 friendly = "deads at" return else diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index 986e5c9b4d..d456c16e04 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -421,7 +421,7 @@ ..() //Feeding, chasing food, FOOOOODDDD - if(!stat && !resting && !buckled) + if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled) turns_since_scan++ if(turns_since_scan > 5) turns_since_scan = 0 @@ -621,7 +621,7 @@ make_babies() - if(!stat && !resting && !buckled) + if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled) if(prob(1)) emote("me", EMOTE_VISIBLE, pick("dances around.","chases her tail.")) spawn(0) @@ -631,8 +631,7 @@ /mob/living/simple_animal/pet/dog/pug/Life() ..() - - if(!stat && !resting && !buckled) + if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled) if(prob(1)) emote("me", EMOTE_VISIBLE, pick("chases its tail.")) spawn(0) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 3d23baae48..86fb8b4b46 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -382,7 +382,7 @@ /mob/living/simple_animal/parrot/handle_automated_movement() - if(!isturf(src.loc) || !canmove || buckled) + if(!isturf(loc) || !CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) || buckled) return //If it can't move, dont let it move. (The buckled check probably isn't necessary thanks to canmove) if(client && stat == CONSCIOUS && parrot_state != icon_living) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 990fa008fe..f70080c5e8 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -152,7 +152,7 @@ /mob/living/simple_animal/proc/handle_automated_movement() set waitfor = FALSE if(!stop_automated_movement && wander) - if((isturf(src.loc) || allow_movement_on_non_turfs) && !resting && !buckled && canmove) //This is so it only moves if it's not inside a closet, gentics machine, etc. + if((isturf(src.loc) || allow_movement_on_non_turfs) && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc. turns_since_move++ if(turns_since_move >= turns_per_move) if(!(stop_automated_movement_when_pulled && pulledby)) //Some animals don't move when pulled diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 0ecb5cf966..61295a8ad5 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -236,10 +236,10 @@ //Blanket /mob/living/proc/AllImmobility(amount, updating, ignore_canstun = FALSE) - _MOBILITYFLAGTEMPORARY_Paralyze(amount, FALSE, ignore_canstun) + Paralyze(amount, FALSE, ignore_canstun) _MOBILITYFLAGTEMPORARY_Knockdown(amount, FALSE, ignore_canstun) - _MOBILITYFLAGTEMPORARY_Stun(amount, FALSE, ignore_canstun) - _MOBILITYFLAGTEMPORARY_Immobilize(amount, FALSE, ignore_canstun) + Stun(amount, FALSE, ignore_canstun) + Immobilize(amount, FALSE, ignore_canstun) if(updating) update_mobility() @@ -277,7 +277,7 @@ return has_status_effect(STATUS_EFFECT_UNCONSCIOUS) /mob/living/proc/AmountUnconscious() //How many deciseconds remain in our unconsciousness - var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious() + var/datum/status_effect/incapacitating/unconscious/U = _MOBILITYFLAGTEMPORARY_IsUnconscious() if(U) return U.duration - world.time return 0 @@ -297,7 +297,7 @@ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) return if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) - var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious() + var/datum/status_effect/incapacitating/unconscious/U = _MOBILITYFLAGTEMPORARY_IsUnconscious() if(amount <= 0) if(U) qdel(U) @@ -311,7 +311,7 @@ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_UNCONSCIOUS, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) return if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun) - var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious() + var/datum/status_effect/incapacitating/unconscious/U = _MOBILITYFLAGTEMPORARY_IsUnconscious() if(U) U.duration += amount else if(amount > 0) @@ -324,7 +324,7 @@ return has_status_effect(STATUS_EFFECT_SLEEPING) /mob/living/proc/AmountSleeping() //How many deciseconds remain in our sleep - var/datum/status_effect/incapacitating/sleeping/S = IsSleeping() + var/datum/status_effect/incapacitating/sleeping/S = _MOBILITYFLAGTEMPORARY_IsSleeping() if(S) return S.duration - world.time return 0 @@ -333,7 +333,7 @@ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) return if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun) - var/datum/status_effect/incapacitating/sleeping/S = IsSleeping() + var/datum/status_effect/incapacitating/sleeping/S = _MOBILITYFLAGTEMPORARY_IsSleeping() if(S) S.duration = max(world.time + amount, S.duration) else if(amount > 0) @@ -358,7 +358,7 @@ if(SEND_SIGNAL(src, COMSIG_LIVING_STATUS_SLEEP, amount, updating, ignore_canstun) & COMPONENT_NO_STUN) return if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_canstun) - var/datum/status_effect/incapacitating/sleeping/S = IsSleeping() + var/datum/status_effect/incapacitating/sleeping/S = _MOBILITYFLAGTEMPORARY_IsSleeping() if(S) S.duration += amount else if(amount > 0) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 9aea4ebf09..3dd6e9dd71 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -34,7 +34,7 @@ var/eye_blurry = 0 //Carbon var/real_name = null var/spacewalk = FALSE - var/resting = 0 //Carbon + var/_MOBILITYFLAGTEMPORARY_resting = 0 //Carbon var/lying = 0 var/lying_prev = 0 diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index d55c934bc5..3ae8094a80 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -72,9 +72,9 @@ ///Set the mobs blurriness of vision to an amount /mob/proc/set_blurriness(amount) eye_blurry = max(amount, 0) - update_eye_blur() + update_eyeblur() -/mob/proc/update_eye_blur() +/mob/proc/update_eyeblur() remove_eyeblur() add_eyeblur() diff --git a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm index d9544313e0..cd62a5caf9 100644 --- a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm +++ b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm @@ -1,7 +1,7 @@ /mob/living/carbon/human/Move(NewLoc, direct) var/oldpseudoheight = pseudo_z_axis . = ..() - if(. && sprinting && !(movement_type & FLYING) && canmove && !resting && m_intent == MOVE_INTENT_RUN && has_gravity(loc) && !pulledby) + if(. && sprinting && !(movement_type & FLYING) && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_MOVE|MOBILITY_STAND) && m_intent == MOVE_INTENT_RUN && has_gravity(loc) && !pulledby) if(!HAS_TRAIT(src, TRAIT_FREESPRINT)) doSprintLossTiles(1) if((oldpseudoheight - pseudo_z_axis) >= 8) @@ -12,7 +12,7 @@ /mob/living/carbon/human/movement_delay() . = 0 - if(!resting && m_intent == MOVE_INTENT_RUN && !sprinting) + if((mobility_flags & MOBILITY_STAND) && m_intent == MOVE_INTENT_RUN && !sprinting) . += 1 if(wrongdirmovedelay) . += 1 @@ -20,7 +20,7 @@ /mob/living/carbon/human/proc/togglesprint() // If you call this proc outside of hotkeys or clicking the HUD button, I'll be disappointed in you. sprinting = !sprinting - if(!resting && m_intent == MOVE_INTENT_RUN && canmove) + if((m_intent == MOVE_INTENT_RUN) && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE)) if(sprinting) playsound_local(src, 'sound/misc/sprintactivate.ogg', 50, FALSE, pressure_affected = FALSE) else diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm b/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm index 4b64588de1..526ea497c4 100644 --- a/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/modular_citadel/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -14,7 +14,7 @@ if(!shutdown && (!cell || cell.charge < 25) || !cansprint) return FALSE sprinting = shutdown ? FALSE : !sprinting - if(!resting && canmove) + if(CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE)) if(sprinting) playsound_local(src, 'sound/misc/sprintactivate.ogg', 50, FALSE, pressure_affected = FALSE) else