Skip to content

Commit

Permalink
fix(Polygons): make sure to add the room id to all newly created Poly…
Browse files Browse the repository at this point in the history
…gon instances
  • Loading branch information
meszaros-lajos-gyorgy committed Dec 20, 2023
1 parent e98c9e4 commit 0229a37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Polygons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ export class Polygons extends Array<Polygon> {
vertices: [...previousPolygon.map(({ vertex }) => vertex), new Vertex(0, 0, 0)] as QuadrupleOf<Vertex>,
texture: currentTexture,
flags: currentTexture instanceof Material ? currentTexture.flags | flags : flags,
room,
})
if (currentTexture instanceof Material && currentTexture.opacity !== 100) {
polygon.setOpacity(currentTexture.opacity, currentTexture.opacityMode)
Expand All @@ -258,6 +259,7 @@ export class Polygons extends Array<Polygon> {
vertices: [...previousPolygon.map(({ vertex }) => vertex), new Vertex(0, 0, 0)] as QuadrupleOf<Vertex>,
texture: currentTexture,
flags: currentTexture instanceof Material ? currentTexture.flags | flags : flags,
room,
})
if (currentTexture instanceof Material && currentTexture.opacity !== 100) {
polygon.setOpacity(currentTexture.opacity, currentTexture.opacityMode)
Expand All @@ -277,6 +279,7 @@ export class Polygons extends Array<Polygon> {
vertices: [...currentPolygon.map(({ vertex }) => vertex), new Vertex(0, 0, 0)] as QuadrupleOf<Vertex>,
texture: currentTexture,
flags: (currentTexture instanceof Material ? currentTexture.flags | flags : flags) & ~ArxPolygonFlags.Quad,
room,
})
if (currentTexture instanceof Material && currentTexture.opacity !== 100) {
polygon.setOpacity(currentTexture.opacity, currentTexture.opacityMode)
Expand Down

0 comments on commit 0229a37

Please sign in to comment.