Don't step on people who are riding you

This commit is contained in:
Aronai Sieyes
2020-05-06 11:25:53 -04:00
parent aaa86b1ed1
commit dd697a2375

View File

@@ -158,6 +158,10 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
* @return false if normal code should continue, true to prevent normal code. * @return false if normal code should continue, true to prevent normal code.
*/ */
/mob/living/proc/handle_micro_bump_helping(mob/living/tmob) /mob/living/proc/handle_micro_bump_helping(mob/living/tmob)
//Riding and being moved to us or something similar
if(tmob in buckled_mobs)
return TRUE
//Both small! Go ahead and go. //Both small! Go ahead and go.
if(get_effective_size() <= RESIZE_A_SMALLTINY && tmob.get_effective_size() <= RESIZE_A_SMALLTINY) if(get_effective_size() <= RESIZE_A_SMALLTINY && tmob.get_effective_size() <= RESIZE_A_SMALLTINY)
return TRUE return TRUE
@@ -214,6 +218,10 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
if(!canmove || buckled) if(!canmove || buckled)
return return
//Riding and being moved to us or something similar
if(tmob in buckled_mobs)
return TRUE
//Test/set if human //Test/set if human
var/mob/living/carbon/human/pred = src var/mob/living/carbon/human/pred = src
if(!istype(pred)) if(!istype(pred))