From 98b195d093f607523093d643f15c6a10a9e2f708 Mon Sep 17 00:00:00 2001 From: Sukkyu Chung Date: Thu, 23 May 2024 01:22:43 +0900 Subject: [PATCH] Fix unit placement for a different team in map editor (#28) --- hera/editor/behavior/DesignBehavior.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hera/editor/behavior/DesignBehavior.tsx b/hera/editor/behavior/DesignBehavior.tsx index 8dc198db..87e5da10 100644 --- a/hera/editor/behavior/DesignBehavior.tsx +++ b/hera/editor/behavior/DesignBehavior.tsx @@ -241,9 +241,7 @@ export default class DesignBehavior { editor: EditorState, ): StateLike | null { let newState: StateLike | null = null; - const players = Array.from( - new Set([...state.map.active, ...PlayerIDs.filter((id) => id !== 0)]), - ).slice(0, vectors.length); + const players = PlayerIDs.filter((id) => id !== 0); vectors.forEach((vector, index) => { const currentPlayerIndex = players.indexOf( state.map.getCurrentPlayer().id,