Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes grab delay after performing an action #4494

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,18 @@
if (!isturf(loc))
return

var/adjacent = A.Adjacent(src)

if(adjacent && src.a_intent == INTENT_GRAB && !W)
click_adjacent(A, W, mods)
return

if (world.time <= next_move && A.loc != src) // Attack click cooldown check
return

next_move = world.time
// If standing next to the atom clicked.
if(A.Adjacent(src))
if(adjacent)
click_adjacent(A, W, mods)
return

Expand All @@ -157,7 +163,7 @@

W.afterattack(A, src, 1, mods)
else
if(!isitem(A) && !issurface(A))
if(!isitem(A) && !issurface(A) && src.a_intent != INTENT_GRAB)
next_move += 4
UnarmedAttack(A, 1, mods)

Expand Down Expand Up @@ -210,7 +216,7 @@
return TRUE

if (mods["ctrl"])
if (Adjacent(user) && user.next_move < world.time)
if (Adjacent(user))
user.start_pulling(src)
return TRUE
return FALSE
Expand Down
2 changes: 0 additions & 2 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,6 @@
return FALSE
var/atom/A = AM.handle_barriers(src)
if(A != AM)
A.attack_alien(src)
xeno_attack_delay(src)
return FALSE
return ..()

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/xenomorph/attack_alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

if(Adjacent(M)) //Logic!
M.start_pulling(src)
return XENO_NO_DELAY_ACTION

if(INTENT_HARM)
if(M.can_not_harm(src))
Expand Down