summaryrefslogtreecommitdiff
path: root/web/web_control.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/web_control.c')
-rw-r--r--web/web_control.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/web/web_control.c b/web/web_control.c
index 74d42e2..5389a23 100644
--- a/web/web_control.c
+++ b/web/web_control.c
@@ -260,6 +260,9 @@ void match_mode_selected(int mode)
match_opts->p1_type = PT_COMP;
match_opts->p2_name = "Computer 2";
match_opts->p2_type = PT_COMP;
+ } else if (mode == M_PVPVP) {
+ match_opts->p1_name = "Player 1";
+ match_opts->p2_name = "Player 2";
}
prompt_match_opts();
@@ -273,17 +276,14 @@ void start_match()
match_opts->p1_name);
match_add_player(match_opts->start_pts, match_opts->p2_type,
match_opts->p2_name ? match_opts->p2_name : "oi");
-
- show_player_info(1);
- update_player_name(1, state->legs[0]->name);
- update_player_rem(1, state->legs[0]->rem);
- update_player_avg(1, 0);
-
- if (match_num_players() != 1) {
- show_player_info(2);
- update_player_name(2, state->legs[1]->name);
- update_player_rem(2, state->legs[1]->rem);
- update_player_avg(2, 0);
+ if (match_opts->mode == M_PVPVP)
+ match_add_player(match_opts->start_pts, PT_USER, "Player 3");
+
+ scoreboard_show_info(match_num_players());
+ for (int i = 1; i <= match_num_players(); ++i) {
+ update_player_name(i, state->legs[i - 1]->name);
+ update_player_rem(i, state->legs[i - 1]->rem);
+ update_player_avg(i, 0);
}
dom_enable_exit_dialogue(true);