Permalink
Browse files

Bug fix for cases where course out and collision take place in the sa…

…me step
  • Loading branch information...
takashi-chikayama committed Dec 31, 2018
1 parent 1de161b commit 07056e01c4d555496f78eae124bd274e1d5a4f16
Showing with 2 additions and 1 deletion.
  1. +2 −1 official/raceState.cpp
@@ -60,6 +60,7 @@ bool RaceLog::playOneStep
course->squares[s.y][s.x] == 1;
})) {
playResult[p] = GONEOFF;
move[p] = Movement(ps.position, ps.position);
}
}
break;
@@ -71,7 +72,7 @@ bool RaceLog::playOneStep
playResult[p] = NOPLAY;
}
}
if (playResult[0] == NORMAL && playResult[1] == NORMAL) {
if (playResult[0] == NORMAL || playResult[1] == NORMAL) {
// Check collision
bool collision = move[0].intersects(move[1]);
if (collision) {

0 comments on commit 07056e0

Please sign in to comment.