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

Adds an animation when missing melee attacks #6199

Closed
wants to merge 1 commit into from
Closed
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
17 changes: 15 additions & 2 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,26 @@
if(W.attack_speed && !src.contains(A)) //Not being worn or carried in the user's inventory somewhere, including internal storages.
next_move += W.attack_speed

if(!A.attackby(W, src, mods) && A && !QDELETED(A))
var/attackby_result = A.attackby(W, src, mods)

if(!attackby_result && A && !QDELETED(A))
// in case the attackby slept
if(!W)
UnarmedAttack(A, 1, mods)
return

W.afterattack(A, src, 1, mods)
W.afterattack(A, src, 1, mods)

// Looks goofy when you swipe at the floor with a gun
if(istype(W, /obj/item/weapon/gun))
return

var/mob/living/self = src
self.animation_attack_on(A)
src.visible_message(SPAN_DANGER("[src] swipes at \the [A] with [W]!"), \
SPAN_DANGER("You swipe at \the [A] with [W]!"), null, 5, CHAT_TYPE_WEAPON_USE)


else
if(!isitem(A) && !issurface(A))
next_move += 4
Expand Down
Loading