diff --git a/src/core/game/GameView.ts b/src/core/game/GameView.ts index 0956542fa..fbb35472d 100644 --- a/src/core/game/GameView.ts +++ b/src/core/game/GameView.ts @@ -443,6 +443,9 @@ export class GameView implements GameMap { ); } }); + + this._myPlayer ??= this.playerByClientID(this._myClientID); + for (const unit of this._units.values()) { unit._wasUpdated = false; unit.lastPos = unit.lastPos.slice(-1); @@ -503,7 +506,6 @@ export class GameView implements GameMap { } myPlayer(): PlayerView | null { - this._myPlayer ??= this.playerByClientID(this._myClientID); return this._myPlayer; }