From 34e0056af2213e2929b3d2f11cc6ba949bafe4a8 Mon Sep 17 00:00:00 2001 From: Tom Burris Date: Mon, 13 Sep 2021 01:46:17 -0700 Subject: [PATCH] fix safe player spawning --- src/Server.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Server.js b/src/Server.js index ccafc2c8d..c3615ad75 100755 --- a/src/Server.js +++ b/src/Server.js @@ -691,7 +691,7 @@ class Server { spawnVirus() { var virus = new Entity.Virus(this, null, this.randomPos(), this.config.virusMinSize); this.safeSpawn(virus); - + } spawnCells(virusCount, foodCount) { for (var i = 0; i < foodCount; i++) { @@ -720,13 +720,7 @@ class Server { } // Spawn player safely (do not check minions) var cell = new Entity.PlayerCell(this, player, pos, size); - if (!player.isMi) { - this.addNode(cell); - } - else { - this.safeSpawn(cell); - } - + player.isMi ? this.addNode(cell) : this.safeSpawn(cell); // Set initial mouse coords player.mouse.assign(pos); }