Skip to content

Commit

Permalink
Fix unit placement for a different team in map editor (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
sookmax authored May 22, 2024
1 parent 6b365f7 commit 98b195d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hera/editor/behavior/DesignBehavior.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 98b195d

Please sign in to comment.