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.
@@ -13396,6 +13396,9 @@ function createGame(imports, engine, options) {
13396
13396
  this.clientBegin({ inventory: createPlayerInventory(), weaponStates: createPlayerWeaponStates(), buttons: 0 });
13397
13397
  }
13398
13398
  },
13399
+ clientConnect(userInfo) {
13400
+ return true;
13401
+ },
13399
13402
  clientBegin(client) {
13400
13403
  const playerStart = findPlayerStart(entities);
13401
13404
  const player = entities.spawn();
@@ -13420,6 +13423,11 @@ function createGame(imports, engine, options) {
13420
13423
  origin = { ...player.origin };
13421
13424
  return player;
13422
13425
  },
13426
+ clientDisconnect(ent) {
13427
+ if (ent && ent.inUse) {
13428
+ entities.free(ent);
13429
+ }
13430
+ },
13423
13431
  clientThink(ent, cmd) {
13424
13432
  runPlayerMove(ent, cmd);
13425
13433
  },