Skip to content

Commit 7daa382

Browse files
committed
fancy wall fix
1 parent 136bbd1 commit 7daa382

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

client/src/playback/GameRenderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class GameRendererClass {
185185
const ctx = this.ctx(CanvasLayers.Background)
186186
const match = GameRunner.match
187187
if (!match || !ctx) return
188-
match.currentRound.map.staticMap.draw(ctx)
188+
match.currentRound.map.staticMap.draw(ctx, GameConfig.config)
189189
this.render()
190190
}
191191

client/src/playback/Map.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ export class StaticMap {
552552
}
553553
}
554554

555-
draw(ctx: CanvasRenderingContext2D) {
555+
draw(ctx: CanvasRenderingContext2D, config: ClientConfig) {
556556
// Fill background
557557
ctx.fillStyle = Colors.TILES_COLOR.get()
558558
ctx.fillRect(
@@ -569,10 +569,15 @@ export class StaticMap {
569569

570570
// Render rounded (clipped) wall
571571
if (this.walls[schemaIdx]) {
572-
renderUtils.renderRounded(ctx, i, j, this, this.walls, () => {
572+
if (config.enableFancyPaint) {
573+
renderUtils.renderRounded(ctx, i, j, this, this.walls, () => {
574+
ctx.fillStyle = Colors.WALLS_COLOR.get()
575+
ctx.fillRect(coords.x, coords.y, 1.0, 1.0)
576+
})
577+
} else {
573578
ctx.fillStyle = Colors.WALLS_COLOR.get()
574579
ctx.fillRect(coords.x, coords.y, 1.0, 1.0)
575-
})
580+
}
576581
}
577582

578583
// Draw grid

0 commit comments

Comments
 (0)