From af97c530f8a7fdc09c3892a9304e5857bbf75a56 Mon Sep 17 00:00:00 2001 From: David Padilla Date: Thu, 5 Oct 2023 22:45:10 -0500 Subject: [PATCH] Fix wrong movement range on avatar hover in the first round Closes #2302 --- src/ui/interface.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/interface.js b/src/ui/interface.js index 0237054e4..772ee6888 100644 --- a/src/ui/interface.js +++ b/src/ui/interface.js @@ -2267,9 +2267,10 @@ export class UI { } }); - const onCreatureMouseEnter = ifGameNotFrozen((creature) => { + const onCreatureMouseEnter = ifGameNotFrozen((placeholderCreature) => { const creatures = ui.game.creatures.filter((c) => c instanceof Creature); - const otherCreatures = creatures.filter((c) => c.id !== creature.id); + const creature = creatures.filter(c => c.id === placeholderCreature.id)[0]; + const otherCreatures = creatures.filter((c) => c.id !== placeholderCreature.id); otherCreatures.forEach((c) => { c.xray(true);