From 2b84fa64c370ce71abfdc791c965dbb9a2e978b4 Mon Sep 17 00:00:00 2001 From: mugg91 Date: Mon, 18 Nov 2024 23:22:30 +0100 Subject: [PATCH] [fixed] don't harvest your own arrows in midair --- Entities/Characters/Archer/ArcherLogic.as | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Entities/Characters/Archer/ArcherLogic.as b/Entities/Characters/Archer/ArcherLogic.as index 7972767a0..00270c0b5 100644 --- a/Entities/Characters/Archer/ArcherLogic.as +++ b/Entities/Characters/Archer/ArcherLogic.as @@ -851,7 +851,7 @@ CBlob@ getPickupArrow(CBlob@ this) for (uint i = 0; i < blobsInRadius.length; i++) { CBlob @b = blobsInRadius[i]; - if (b.getName() == "arrow") + if (b.getName() == "arrow" && b.getShape().isStatic()) { return b; } @@ -1095,19 +1095,16 @@ void onCommand(CBlob@ this, u8 cmd, CBitStream @params) if (arrow !is null/* || spriteArrow*/) { - if (arrow !is null) + ArcherInfo@ archer; + if (!this.get("archerInfo", @archer)) { - ArcherInfo@ archer; - if (!this.get("archerInfo", @archer)) - { - return; - } - const u8 arrowType = archer.arrow_type; - if (arrowType == ArrowType::bomb) - { - arrow.setPosition(this.getPosition()); - return; - } + return; + } + const u8 arrowType = archer.arrow_type; + if (arrowType == ArrowType::bomb) + { + arrow.setPosition(this.getPosition()); + return; } CBlob@ mat_arrows = server_CreateBlobNoInit('mat_arrows');