quake2ts 0.0.208 → 0.0.209

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.
@@ -13562,6 +13562,9 @@ function createGame(imports, engine, options) {
13562
13562
  this.clientBegin({ inventory: createPlayerInventory(), weaponStates: createPlayerWeaponStates(), buttons: 0 });
13563
13563
  }
13564
13564
  },
13565
+ clientConnect(userInfo) {
13566
+ return true;
13567
+ },
13565
13568
  clientBegin(client) {
13566
13569
  const playerStart = findPlayerStart(entities);
13567
13570
  const player = entities.spawn();
@@ -13586,6 +13589,11 @@ function createGame(imports, engine, options) {
13586
13589
  origin = { ...player.origin };
13587
13590
  return player;
13588
13591
  },
13592
+ clientDisconnect(ent) {
13593
+ if (ent && ent.inUse) {
13594
+ entities.free(ent);
13595
+ }
13596
+ },
13589
13597
  clientThink(ent, cmd) {
13590
13598
  runPlayerMove(ent, cmd);
13591
13599
  },