[MIRROR] Digitigrade Paralysis BugFix (#6411)

* Digitigrade Paralysis BugFix (#59697)

* Fixing Digitigrade Legs, Adding Sanity Checks

- A limb's attach_limb proc now uses the set_owner() proc instead of setting the owner manually, fixing problems where limbs that were meant to be paralyzed were not
- Added a sanity check to set_usable_legs to ensure the value isn't set lower than 0

* Adds A Stack Trace to Set_Usable_Legs

- set_usable_legs now calls stack_trace() whenever it is provided with a negative value

* Digitigrade Paralysis BugFix

Co-authored-by: Beatrice <83368538+SpaceDragon00@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-06-21 01:47:52 +02:00
committed by GitHub
parent 3639a650cc
commit 46bb3babb4
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -1872,6 +1872,10 @@
/mob/living/proc/set_usable_legs(new_value)
if(usable_legs == new_value)
return
if(new_value < 0) // Sanity check
stack_trace("[src] had set_usable_legs() called on them with a negative value!")
new_value = 0
. = usable_legs
usable_legs = new_value