Skip to content

Commit 511f67d

Browse files
committed
at initial waypoint
1 parent ffcf91b commit 511f67d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

client/src/playback/Brushes.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,9 +517,7 @@ export class CatBrush extends SymmetricMapEditorBrush<StaticMap> {
517517
if (this.bodies.getBodyAtLocation(x, y) || this.map.wallAt(x, y)) {
518518
return null
519519
}
520-
if (!this.map.catWaypoints.has(currentCat)) {
521-
this.map.catWaypoints.set(currentCat, [])
522-
}
520+
523521
this.map.catWaypoints.get(currentCat)?.push({ x, y })
524522

525523
return () => {
@@ -537,6 +535,7 @@ export class CatBrush extends SymmetricMapEditorBrush<StaticMap> {
537535

538536
const id = this.bodies.getNextID()
539537
this.bodies.spawnBodyFromValues(id, schema.RobotType.CAT, team, pos, 0, robotOne ? 0 : 1)
538+
this.map.catWaypoints.set(id, [{ x: x, y: y }]) // add initial waypoint at spawn location
540539

541540
return id
542541
}

0 commit comments

Comments
 (0)