Skip to content

Commit

Permalink
Change turnon attribute and initialize position
Browse files Browse the repository at this point in the history
  • Loading branch information
ShotaAk committed Aug 16, 2017
1 parent d879825 commit bd1569d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/proto/grSim_Replacement.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ required double y=2;
required double dir=3;
required uint32 id=4;
required bool yellowteam=5;
required bool turnon=6;
optional bool turnon=6;
}

message grSim_BallReplacement {
Expand Down
2 changes: 1 addition & 1 deletion src/sslworld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,10 @@ void SSLWorld::recvActions()
if (!packet.replacement().robots(i).has_id()) continue;
int k = packet.replacement().robots(i).id();
dReal x = 0, y = 0, dir = 0;
bool turnon = true;
if (packet.replacement().robots(i).has_x()) x = packet.replacement().robots(i).x();
if (packet.replacement().robots(i).has_y()) y = packet.replacement().robots(i).y();
if (packet.replacement().robots(i).has_dir()) dir = packet.replacement().robots(i).dir();
bool turnon = true;
if (packet.replacement().robots(i).has_turnon()) turnon = packet.replacement().robots(i).turnon();
int id = robotIndex(k, team);
if ((id < 0) || (id >= ROBOT_COUNT*2)) continue;
Expand Down

0 comments on commit bd1569d

Please sign in to comment.