@hytopia.com/examples 1.0.49 → 1.0.50

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.
@@ -194,7 +194,7 @@ class BotStubPlayer extends EventRouter {
194
194
  export default class BotPlayerEntity extends GamePlayerEntity {
195
195
  private static readonly _botsByWorld: Map<number, Set<BotPlayerEntity>> = new Map();
196
196
  private static readonly _activeWorlds: Set<number> = new Set();
197
- private static readonly _maxBots = 6;
197
+ private static readonly _maxBots = 5 + Math.floor(Math.random() * 4); // 5-8 inclusive
198
198
 
199
199
  public static ensureForWorld(world: World): void {
200
200
  const bots = this._botsByWorld.get(world.id) ?? new Set<BotPlayerEntity>();
@@ -18,7 +18,6 @@ import {
18
18
  ITEM_SPAWNS,
19
19
  ITEM_SPAWNS_AT_START,
20
20
  ITEM_SPAWN_ITEMS,
21
- MINIMUM_PLAYERS_TO_START,
22
21
  SPAWN_REGION_AABB,
23
22
  RANK_WIN_EXP,
24
23
  } from '../gameConfig';
@@ -103,8 +102,6 @@ export default class GameManager {
103
102
  this.world.chatManager.sendBroadcastMessage('Game over! Starting the next round in 10 seconds...', 'FF0000');
104
103
 
105
104
  this._identifyWinningPlayer();
106
-
107
- BotPlayerEntity.despawnAll(this.world);
108
105
  this.refreshPlayerCount();
109
106
 
110
107
  // Clear any existing restart timer
@@ -214,8 +211,6 @@ export default class GameManager {
214
211
  private _cleanup() {
215
212
  if (!this.world) return;
216
213
 
217
- BotPlayerEntity.despawnAll(this.world);
218
-
219
214
  // Reset map to initial state
220
215
  this.world.loadMap(worldMap);
221
216
  this._spawnBedrock(this.world);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hytopia.com/examples",
3
- "version": "1.0.49",
3
+ "version": "1.0.50",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",