mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-04-05 06:57:24 +02:00
fix: prevent error on rendering removed or neutral states in stateLabelsRenderer
This commit is contained in:
parent
3ab40ada5f
commit
6ab2c03860
1 changed files with 1 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ const stateLabelsRenderer = (list?: number[]): void => {
|
||||||
for (const labelData of labelDataList) {
|
for (const labelData of labelDataList) {
|
||||||
const state = states[labelData.stateId];
|
const state = states[labelData.stateId];
|
||||||
if (!state.i || state.removed)
|
if (!state.i || state.removed)
|
||||||
throw new Error("State must not be neutral or removed");
|
continue;
|
||||||
|
|
||||||
// Calculate pathPoints using raycast algorithm (recalculated on each draw)
|
// Calculate pathPoints using raycast algorithm (recalculated on each draw)
|
||||||
const offset = getOffsetWidth(state.cells!);
|
const offset = getOffsetWidth(state.cells!);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue