diff --git a/src/client/graphics/layers/RadialMenuElements.ts b/src/client/graphics/layers/RadialMenuElements.ts index 6f72f7149..44d63bb1f 100644 --- a/src/client/graphics/layers/RadialMenuElements.ts +++ b/src/client/graphics/layers/RadialMenuElements.ts @@ -572,6 +572,9 @@ export const centerButtonElement: CenterButtonElement = { return true; } if (params.game.inSpawnPhase()) { + if (params.game.config().isRandomSpawn()) { + return true; + } if (tileOwner.isPlayer()) { return true; } diff --git a/src/core/execution/SpawnExecution.ts b/src/core/execution/SpawnExecution.ts index 5f0694fd8..4162e85fc 100644 --- a/src/core/execution/SpawnExecution.ts +++ b/src/core/execution/SpawnExecution.ts @@ -42,6 +42,11 @@ export class SpawnExecution implements Execution { player = this.mg.addPlayer(this.playerInfo); } + // Security: If random spawn is enabled, prevent players from re-rolling their spawn location + if (this.mg.config().isRandomSpawn() && player.hasSpawned()) { + return; + } + this.tile ??= this.randomSpawnLand(); if (this.tile === undefined) {