Skip to content

Commit

Permalink
Fixes Warrior Pulls continuously breaking after lunging a M56D/M2C us…
Browse files Browse the repository at this point in the history
…er from front (#5151)

# About the pull request

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

So that one took a lot of debugging...

To keep it as short as possible, when you lunge a M56D/M2C user from
front as Warrior, they get stunned. The stun cancels their HMG
interaction, causing them to step away. This means they leave the grab
range, breaking it. Warrior code incorrectly re-sets pulledby, resulting
in a mob "pulledby" one that doesn't pull it.

In practice once this happens, this means that the "incorrectly" pulled
mob will reset any active grabs from the Warrior when it moves. Negating
the use of lunges completely.


# Changelog
:cl: Firartix, Birdtalon
fix: Fixed a logic error in Warrior code causing lunging some M2C/M56D
users to semi-permanently brick lunge.
/:cl:

---------

Co-authored-by: BeagleGaming1 <[email protected]>
  • Loading branch information
fira and BeagleGaming1 authored Dec 7, 2023
1 parent badebd0 commit f3388b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/castes/Warrior.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@
if(should_neckgrab && living_mob.mob_size < MOB_SIZE_BIG)
living_mob.drop_held_items()
living_mob.apply_effect(get_xeno_stun_duration(living_mob, 2), WEAKEN)
living_mob.pulledby = src
if(living_mob.pulledby != src)
return // Grab was broken, probably as Stun side effect (eg. target getting knocked away from a manned M56D)
visible_message(SPAN_XENOWARNING("[src] grabs [living_mob] by the throat!"), \
SPAN_XENOWARNING("You grab [living_mob] by the throat!"))
lunging = TRUE
Expand Down

0 comments on commit f3388b3

Please sign in to comment.