Skip to content

Commit

Permalink
Move xeno grab cooldown change to just ctrl+click logic (#4246)
Browse files Browse the repository at this point in the history
# About the pull request

This PR is a followup to #4204 that introduced a cooldown to grabbing to
fix an exploit. Unfortunately this broke logic for xeno grab intent
click though because that logic pre-emptively is adjusting next_move
(that xenos just override and ignore anyways), so now the cooldown check
is added to just ctrl+click. Technically this means that human
ctrl+click *could* be affected by this change, but I haven't currently
found any effects of this.

# Explain why it's good for the game

Fixes #4244 

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

https://youtu.be/BMRnHIa967Q

</details>


# Changelog
:cl: Drathek
fix: Fixed xeno grab intent
/:cl:
  • Loading branch information
Drulikar committed Sep 5, 2023
1 parent 2f3b9aa commit 73355dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
return TRUE

if (mods["ctrl"])
if (Adjacent(user))
if (Adjacent(user) && user.next_move < world.time)
user.start_pulling(src)
return TRUE
return FALSE
Expand Down
3 changes: 0 additions & 3 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,6 @@


/mob/living/carbon/xenomorph/start_pulling(atom/movable/AM, lunge, no_msg)
if(next_move >= world.time)
return FALSE

if(SEND_SIGNAL(AM, COMSIG_MOVABLE_XENO_START_PULLING, src) & COMPONENT_ALLOW_PULL)
return do_pull(AM, lunge, no_msg)

Expand Down

0 comments on commit 73355dc

Please sign in to comment.