From 9da36f9244c8fb4708aa92a5a2e1e42fd85fecda Mon Sep 17 00:00:00 2001 From: Verkister Date: Thu, 24 Sep 2020 11:15:39 +0300 Subject: [PATCH] earlyport cleave exploit fix if ya can't poke them ya don't get to slash either --- code/game/objects/weapons.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index 19fe4eb03c..cd0190c71e 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -36,6 +36,8 @@ continue if(!SM.Adjacent(user) || !SM.Adjacent(target)) // Cleaving only hits mobs near the target mob and user. continue + if(!attack_can_reach(user, SM, 1)) + continue if(resolve_attackby(SM, user, attack_modifier = 0.5)) // Hit them with the weapon. This won't cause recursive cleaving due to the cleaving variable being set to true. hit_mobs++