Le support aux utilisateurs et les demandes de création de comptes externes doivent être faites depuis les issues du projet GitLab HEFR (https://gitlab.forge.hefr.ch/forge-hefr/gitlab-hefr)

Commit 867ef3bf authored by Nicolas Maier's avatar Nicolas Maier
Browse files

correction

parent 53b30052
Pipeline #7172 failed with stage
in 14 seconds
......@@ -96,17 +96,11 @@ static void game_thread(void* param)
next_state.ennemy_pos = msg_data[1];
break;
case COMMUNICATION_BALL:
next_state.ball_pos.x = msg_data[1];
next_state.ball_pos.y = DISPLAY_GAME_AREA_SIZE - DISPLAY_BALL_SIZE - msg_data[2];
next_state.ball_dir.x = ((float*)(msg_data + 4))[0];
next_state.ball_dir.y = -((float*)(msg_data + 4))[1];
if (next_state.is_waiting_ready) {
display_ball(next_state.ball_pos.x, next_state.ball_pos.y,
former_state.ball_pos.x, former_state.ball_pos.y);
former_state.ball_pos = next_state.ball_pos;
display_show_text(" Ready? ", 4, 33);
if (!next_state.is_ally_playing) {
next_state.ball_pos.x = msg_data[1];
next_state.ball_pos.y = DISPLAY_GAME_AREA_SIZE - DISPLAY_BALL_SIZE - msg_data[2];
next_state.ball_dir.x = ((float*)(msg_data + 4))[0];
next_state.ball_dir.y = -((float*)(msg_data + 4))[1];
}
break;
case COMMUNICATION_SCORE:
......@@ -118,8 +112,7 @@ static void game_thread(void* param)
break;
case COMMUNICATION_POINT:
next_state.is_ally_playing = true;
next_state.is_waiting_ready = true;
timer_get_counter(DMTIMER_3);
prepare_set();
next_state.ally_score += 1;
break;
}
......@@ -180,7 +173,7 @@ static void game_thread(void* param)
prepare_set();
}
} else {
communication_sendBall(next_state.ball_pos.x, next_state.ball_pos.y, next_state.ball_dir.x, next_state.ball_dir.y);
//communication_sendBall(next_state.ball_pos.x, next_state.ball_pos.y, next_state.ball_dir.x, next_state.ball_dir.y);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment