diff --git a/TODO.txt b/TODO.txt index 3a70005fb..4323128ad 100644 --- a/TODO.txt +++ b/TODO.txt @@ -16,8 +16,9 @@ * attacks cancel out DONE 8/13/2024 * upload and start server DONE 8/13/2024 * fix multiplayer DONE 8/14/2024 -* fix server resource leak +* fix server resource leak DONE 8/14/2024 * balance attacks/expansions better +* delete players when territories too small * better algorithm for name render placement * make boats larger * have boats not get close to shore diff --git a/src/core/execution/AttackExecution.ts b/src/core/execution/AttackExecution.ts index 67d0e1350..e50044eb8 100644 --- a/src/core/execution/AttackExecution.ts +++ b/src/core/execution/AttackExecution.ts @@ -25,6 +25,9 @@ export class AttackExecution implements Execution { init(mg: MutableGame, ticks: number) { + // TODO: remove this and fix directed expansion. + this.targetCell = null + this._owner = mg.player(this._ownerID) this.target = this.targetID == null ? mg.terraNullius() : mg.player(this.targetID) this.troops = Math.min(this._owner.troops(), this.troops)