From 7817353e156e60c23d906841024b610a8ef6628a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Fri, 23 Apr 2021 17:36:56 +0200 Subject: [PATCH] fix: Arrow TTL killing problem --- core/src/sagittarius/model/Arrow.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/sagittarius/model/Arrow.java b/core/src/sagittarius/model/Arrow.java index f2ece14..f0e6711 100644 --- a/core/src/sagittarius/model/Arrow.java +++ b/core/src/sagittarius/model/Arrow.java @@ -146,7 +146,8 @@ public class Arrow extends EntityQuad { private void verifyHitting() { for (Actor actor : GameScreen.players.getChildren()) { Player player = (Player) actor; - if (TTL < 19 && Intersector.overlapConvexPolygons(player.hitbox, this.hitbox)) { + if (player == GameScreen.playerCurrent && TTL > 19.5) break; + if (Intersector.overlapConvexPolygons(player.hitbox, this.hitbox)) { landed = true; GameScreen.removePlayer(player); GameScreen.arrows.removeActor(this);