Skip to content

Commit

Permalink
Merge pull request #156 from YuseiNaito/fix-robot-replacement
Browse files Browse the repository at this point in the history
Use `grSim_RobotReplacement::yellowteam` to determine the team
  • Loading branch information
mahi97 authored Mar 10, 2021
2 parents 8d3b8c7 + 7e32d3c commit 5e8b76a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sslworld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ void SSLWorld::recvActions() {
if (grSimPacket.has_replacement()) {
for (int i=0; i < grSimPacket.replacement().robots_size(); i++) {
int team = 0;
if (grSimPacket.commands().has_isteamyellow() && grSimPacket.commands().isteamyellow()) team = 1;
if (grSimPacket.replacement().robots(i).has_yellowteam() && grSimPacket.replacement().robots(i).yellowteam()) team = 1;

if (!grSimPacket.replacement().robots(i).has_id()) continue;
int k = grSimPacket.replacement().robots(i).id();
Expand Down

0 comments on commit 5e8b76a

Please sign in to comment.