Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ tech changes will usually be stripped from release notes for the public
- Collapse selection not immediately syncing position change until a move
- Public aura syncing to non-owners not working as intended
- Pressing enter in the initiative UI could sometimes open a selected shape's property dialog
- Moving shapes to a different floor with disabled auras now behaves correctly
- [tech] Asset db rows were not properly being cleaned up when a file was removed on disk

### Removed
Expand Down
12 changes: 7 additions & 5 deletions client/src/game/vision/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,11 +717,13 @@ class VisionState extends Store<State> {

moveVisionSource(source: LocalId, auras: readonly Aura[], oldFloor: FloorId, newFloor: FloorId): void {
for (const aura of auras) {
if (!aura.visionSource) continue;
this.sliceVisionSources(
this.getVisionSources(oldFloor).findIndex((s) => s.shape === source && s.aura === aura.uuid),
oldFloor,
);
if (!aura.active || !aura.visionSource) continue;
const index = this.getVisionSources(oldFloor).findIndex((s) => s.shape === source && s.aura === aura.uuid);
if (index === -1) {
console.error("Failed to find vision source in old floor - skipping.");
continue;
}
this.sliceVisionSources(index, oldFloor);
this.addVisionSource({ shape: source, aura: aura.uuid, isFloodLight: aura.floodLight }, newFloor);
}
}
Expand Down
Loading