Mercurial > hg > old > magoroku_racing.bad
changeset 84:0c533df35784
*** empty log message ***
author | gongo |
---|---|
date | Thu, 09 Nov 2006 23:51:13 +0000 |
parents | 22821fc0dddb |
children | 757d4e468a2b |
files | linda.c |
diffstat | 1 files changed, 7 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/linda.c Thu Nov 09 19:08:22 2006 +0000 +++ b/linda.c Thu Nov 09 23:51:13 2006 +0000 @@ -116,22 +116,14 @@ } } -static Bool +static void linda_set_schedule(void *func, int mode) { - char *reply = NULL; int id = game.play_id; - reply = psx_reply(linda_seq[id]); - if (reply) { - linda_seq[id] = psx_in(id); - psx_free(reply); - return FALSE; - } else { - sche_func = func; - send_packet(id, mode, game.car_id, game.course_id, NULL); - return TRUE; - } + linda_seq[id] = psx_in(id); + sche_func = func; + send_packet(id, mode, game.car_id, game.course_id, NULL); } static Bool @@ -152,10 +144,7 @@ } if (p == 1 && connect == CLIENT_MAX) { - if (linda_set_schedule(linda_sche_wait_ready0, MODE_WAIT_READY) == TRUE) - return TRUE; - else - return FALSE; + linda_set_schedule(linda_sche_wait_ready0, MODE_WAIT_READY); } else { return FALSE; } @@ -724,10 +713,10 @@ if (my_id == PLAYER_1P) { sche_func = &linda_sche_wait0; - send_packet(game.play_id, MODE_WAIT, 1, 1, NULL); } else { sche_func = &linda_sche_wait1; - send_packet(game.play_id, MODE_WAIT, 1, 1, NULL); } + send_packet(game.play_id, MODE_WAIT, 1, 1, NULL); + return my_id; }