Skip to content

Commit

Permalink
chore: add info logs for middle spawning bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakShearman committed Apr 6, 2024
1 parent f739967 commit e082e42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public BlockSumoGame(@NotNull GameCreationInfo creationInfo, @NotNull LoadedMap

this.powerUpManager = new PowerUpManager(this);
this.powerUpManager.registerDefaultPowerUps();
System.out.printf("Current players (%s): %s%n", creationInfo.playerIds().size(), creationInfo.playerIds()); // Bug: players spawning in middle of map
this.initialSpawnPointSelector = new InitialSpawnPointSelector(creationInfo.playerIds().size(), this.map.data().spawnRadius());
this.explosionManager = new ExplosionManager(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public InitialSpawnPointSelector(int playerCount, int spawnRadius) {
}

private @NotNull Queue<Pos> generateSpawns(int playerCount, int spawnRadius) {
LOGGER.info("Generating spawn points for {} players", playerCount); // Bug: players spawning in middle of map

double playerOffset = TWO_PI / Math.max(playerCount, 1); // Fixes 0 player count on local testing

Queue<Pos> spawns = new ArrayDeque<>();
Expand Down

0 comments on commit e082e42

Please sign in to comment.