Skip to content

Commit fbbc672

Browse files
ShotaAkg3force
authored andcommitted
Set different positions at the turn off procedure to avoid collisions of the robots.
1 parent b49a694 commit fbbc672

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sslworld.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -842,8 +842,9 @@ void SSLWorld::processTeleportRobot(const TeleportRobot &teleBot, Robot *robot)
842842
if (teleBot.has_present()) {
843843
robot->on = teleBot.present();
844844
if(!teleBot.present()) {
845-
// Move it out of the field
846-
robot->setXY(1e6, 1e6);
845+
// Move it out of the field.
846+
// Set different x and y to avoid collisions of the robots.
847+
robot->setXY(1e6 * teleBot.id().id(), 1e6 * teleBot.id().team());
847848
}
848849
}
849850
}

0 commit comments

Comments
 (0)