mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
(SQ-Merge) Possible fix for drop-nomming (#3331)
* possible drop-nomming fix * no longer 100% fall cushion on non-aligning prefs * fixed some checks
This commit is contained in:
committed by
Aronai Sieyes
parent
cce782335f
commit
be17090547
@@ -1,6 +1,6 @@
|
||||
|
||||
/mob/living/handle_fall(var/turf/landing)
|
||||
var/mob/drop_mob= locate(/mob, loc)
|
||||
var/mob/drop_mob = locate(/mob, landing)
|
||||
|
||||
if(locate(/obj/structure/stairs) in landing)
|
||||
for(var/atom/A in landing)
|
||||
@@ -13,8 +13,10 @@
|
||||
if(!O.CanFallThru(src, landing))
|
||||
return 1
|
||||
|
||||
if(drop_mob && drop_mob != src && ismob(drop_mob)) //Shitload of checks. This is because the game finds various ways to screw me over.
|
||||
drop_mob.fall_impact(src)
|
||||
if(drop_mob && !(drop_mob == src) && ismob(drop_mob) && isliving(drop_mob)) //Shitload of checks. This is because the game finds various ways to screw me over.
|
||||
var/mob/living/drop_living = drop_mob
|
||||
if(drop_living.dropped_onto(src))
|
||||
return
|
||||
|
||||
// Then call parent to have us actually fall
|
||||
return ..()
|
||||
@@ -41,9 +43,9 @@
|
||||
M.visible_message("<span class='danger'>\The [src] drops onto \the [M]! FALL IMPACT SHADOW WEAKEN 8</span>")
|
||||
M.Weaken(8)
|
||||
*/
|
||||
if(isliving(hit_atom)) //THIS WEAKENS THE PERSON FALLING & NOMS THE PERSON FALLEN ONTO. SRC is person fallen onto. hit_atom is the person falling. Confusing.
|
||||
/* if(isliving(hit_atom)) //THIS WEAKENS THE PERSON FALLING & NOMS THE PERSON FALLEN ONTO. SRC is person fallen onto. hit_atom is the person falling. Confusing.
|
||||
var/mob/living/pred = hit_atom
|
||||
pred.visible_message("<span class='danger'>\The [hit_atom] falls onto \the [src]!</span>")
|
||||
pred.visible_message("<span class='danger'>\The [hit_atom] falls onto \the [src.owner]!</span>")
|
||||
pred.Weaken(8) //Stun the person you're dropping onto! You /are/ suffering massive damage for a single stun.
|
||||
var/mob/living/prey = src.owner //The shadow's owner
|
||||
if(isliving(prey))
|
||||
@@ -52,7 +54,42 @@
|
||||
else if(prey.can_be_drop_pred && pred.can_be_drop_prey) //Is person being fallen onto pred & person falling prey
|
||||
pred.feed_grabbed_to_self_falling_nom(prey,pred) //oh, how the tables have turned.
|
||||
else
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
prey.Weaken(8) //Just fall onto them if neither of the above apply.
|
||||
var/tdamage
|
||||
for(var/i = 1 to 10)
|
||||
tdamage = rand(0, 10)/2
|
||||
pred.adjustBruteLoss(tdamage)
|
||||
prey.adjustBruteLoss(tdamage)
|
||||
pred.updatehealth()
|
||||
prey.updatehealth()
|
||||
*/
|
||||
/mob/living/proc/dropped_onto(var/atom/hit_atom)
|
||||
if(!isliving(hit_atom))
|
||||
return 0
|
||||
|
||||
var/mob/living/pred = hit_atom
|
||||
pred.visible_message("<span class='danger'>\The [hit_atom] falls onto \the [src]!</span>")
|
||||
pred.Weaken(8)
|
||||
var/mob/living/prey = src
|
||||
var/fallloc = prey.loc
|
||||
if(pred.can_be_drop_pred && prey.can_be_drop_prey)
|
||||
pred.feed_grabbed_to_self_falling_nom(pred,prey)
|
||||
pred.loc = fallloc
|
||||
else if(prey.can_be_drop_pred && pred.can_be_drop_prey)
|
||||
prey.feed_grabbed_to_self_falling_nom(prey,pred)
|
||||
else
|
||||
prey.Weaken(8)
|
||||
pred.loc = prey.loc
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
var/tdamage
|
||||
for(var/i = 1 to 10)
|
||||
tdamage = rand(0, 10)/2
|
||||
pred.adjustBruteLoss(tdamage)
|
||||
prey.adjustBruteLoss(tdamage)
|
||||
pred.updatehealth()
|
||||
prey.updatehealth()
|
||||
return 1
|
||||
|
||||
/mob/observer/dead/CheckFall()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user