mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
[S] Checks for incapacitation when updating mobility (#43302)
* Adds incap check to canusetopic * Collates if branches * properly fixes mobility flags
This commit is contained in:
@@ -1101,19 +1101,21 @@
|
||||
should_be_lying = buckled.buckle_lying
|
||||
|
||||
if(should_be_lying)
|
||||
mobility_flags &= ~(MOBILITY_UI | MOBILITY_PULL | MOBILITY_STAND)
|
||||
mobility_flags &= ~MOBILITY_STAND
|
||||
if(buckled)
|
||||
if(buckled.buckle_lying != -1)
|
||||
lying = buckled.buckle_lying
|
||||
if(!lying) //force them on the ground
|
||||
lying = pick(90, 270)
|
||||
else
|
||||
if(!restrained)
|
||||
mobility_flags |= (MOBILITY_UI | MOBILITY_PULL)
|
||||
else
|
||||
mobility_flags &= ~(MOBILITY_UI | MOBILITY_PULL)
|
||||
mobility_flags |= MOBILITY_STAND
|
||||
lying = 0
|
||||
|
||||
if(should_be_lying || restrained || incapacitated())
|
||||
mobility_flags &= ~(MOBILITY_UI|MOBILITY_PULL)
|
||||
else
|
||||
mobility_flags |= MOBILITY_UI|MOBILITY_PULL
|
||||
|
||||
|
||||
|
||||
var/canitem = !paralyzed && !stun && conscious && !chokehold && !restrained && has_arms
|
||||
|
||||
Reference in New Issue
Block a user