@hytopia.com/examples 1.0.51 → 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -195,7 +195,7 @@ class BotStubPlayer extends EventRouter {
|
|
|
195
195
|
export default class BotPlayerEntity extends GamePlayerEntity {
|
|
196
196
|
private static readonly _botsByWorld: Map<number, Set<BotPlayerEntity>> = new Map();
|
|
197
197
|
private static readonly _activeWorlds: Set<number> = new Set();
|
|
198
|
-
private static readonly _maxBots =
|
|
198
|
+
private static readonly _maxBots = 5 + Math.floor(Math.random() * 4); // 5-8 inclusive
|
|
199
199
|
|
|
200
200
|
public static ensureForWorld(world: World): void {
|
|
201
201
|
const bots = this._botsByWorld.get(world.id) ?? new Set<BotPlayerEntity>();
|