From 19b12c812edad6714cdb0e36a7cf98bb1bda9a84 Mon Sep 17 00:00:00 2001 From: Ayush Maniar Date: Fri, 21 Mar 2025 02:18:07 -0700 Subject: [PATCH] Teleportation changes which got removed due to merge conflicts, added back --- src/agent/tasks.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/agent/tasks.js b/src/agent/tasks.js index fc29763..00b11a0 100644 --- a/src/agent/tasks.js +++ b/src/agent/tasks.js @@ -289,7 +289,6 @@ export class Task { } else { this.initiator = null; } - await this.teleportBots(); //wait for a bit so bots are teleported await new Promise((resolve) => setTimeout(resolve, 3000)); @@ -324,6 +323,8 @@ export class Task { await this.initiator.init(); } + await this.teleportBots(); + if (this.data.agent_count && this.data.agent_count > 1) { // TODO wait for other bots to join await new Promise((resolve) => setTimeout(resolve, 10000)); @@ -379,6 +380,11 @@ export class Task { console.log(`Teleporting ${this.name} to human ${human_player_name}`) bot.chat(`/tp ${this.name} ${human_player_name}`) } + else { + console.log(`Teleporting ${this.name} to ${this.available_agents[0]}`) + bot.chat(`/tp ${this.name} ${this.available_agents[0]}`); + } + await new Promise((resolve) => setTimeout(resolve, 200)); // now all bots are teleport on top of each other (which kinda looks ugly)