Skip to content

Commit

Permalink
fix: Prevent debug draw of non-solid Isometric tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Jan 4, 2024
1 parent c266288 commit 3c820fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Fixed

- Fixed issue where `IsometricMap` would debug draw collision geometry on non-solid tiles
- Fixed issue where `CompositeCollider` offset was undefined if not set
- Fixed Actor so it receives `predraw`/`postdraw` events per the advertised strongly typed events
- Fixed infinite loop :bomb: when certain degenerate polygons were attempted to be triangulated!
Expand Down
6 changes: 4 additions & 2 deletions src/engine/TileMap/IsometricMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,10 @@ export class IsometricMap extends Entity {
}
if (showAll || showColliderGeometry) {
for (const tile of this.tiles) {
for (const collider of tile.getColliders()) {
collider.debug(gfx, geometryColor, { lineWidth: geometryLineWidth, pointSize: geometryPointSize });
if (tile.solid) { // only draw solid tiles
for (const collider of tile.getColliders()) {
collider.debug(gfx, geometryColor, { lineWidth: geometryLineWidth, pointSize: geometryPointSize });
}
}
}
}
Expand Down

0 comments on commit 3c820fe

Please sign in to comment.