version 1.4 | | version 1.5 |
---|
| | |
nm_messagebox("Players", 1, TXT_OK, pilots); | | nm_messagebox("Players", 1, TXT_OK, pilots); |
} | | } |
| | |
void show_game_stats(netgame_info game) | | void show_game_score(netgame_info game); |
| | |
| | int show_game_stats(netgame_info game,int awesomeflag) |
{ | | { |
//edited 4/18/99 Matt Mueller - show radar flag and banned stuff too | | //edited 4/18/99 Matt Mueller - show radar flag and banned stuff too |
//switched to the info/rinfo mode to 1)allow sprintf easily 2) save some | | //switched to the info/rinfo mode to 1)allow sprintf easily 2) save some |
| | |
} | | } |
//end edit -MM | | //end edit -MM |
//end edit -MM | | //end edit -MM |
| | if (awesomeflag){ |
| | int c; |
| | while (1){ |
| | c=nm_messagebox("Stats", 3, "Players","Scores","Join Game", rinfo); |
| | if (c==0) |
| | show_game_players(game); |
| | else if (c==1) |
| | show_game_score(game); |
| | else if (c==2) |
| | return 1; |
| | else |
| | return 0; |
| | } |
| | }else{ |
nm_messagebox("Stats", 1, TXT_OK, rinfo); | | nm_messagebox("Stats", 1, TXT_OK, rinfo); |
| | return 0; |
| | } |
} | | } |
//end this section addition - Victor Rachels | | //end this section addition - Victor Rachels |
| | |
| | |
//added on 10/12/98 by Victor Rachels to show netgamelist scores | | //added on 10/12/98 by Victor Rachels to show netgamelist scores |
void show_game_score(netgame_info game) | | void show_game_score(netgame_info game) |
{ | | { |
char scores[2176],info[2048],deaths[128],tmp[10]; | | char scores[2176]="",info[2048]="",deaths[128]="",tmp[10]; |
int i,j,k; | | int i,j,k; |
| | |
memset(scores,0,sizeof(char)*2176); | | |
memset(info,0,sizeof(char)*2048); | | |
memset(deaths,0,sizeof(char)*128); | | |
| | |
strcat(scores,"Pilots "); | | strcat(scores,"Pilots "); |
strcat(deaths," "); | | strcat(deaths," "); |
| | |
| | |
} | | } |
//end this section addition - Victor Rachels | | //end this section addition - Victor Rachels |
| | |
| | //added on 2000/01/29 by Matt Mueller for direct ip join. |
| | #include "netpkt.h" |
| | int network_do_join_game(netgame_info *jgame); |
| | int get_and_show_netgame_info(ubyte *server, ubyte *node, ubyte *net_address){ |
| | sequence_packet me; |
| | fix nextsend; |
| | int numsent; |
| | fix curtime; |
| | |
| | if (setjmp(LeaveGame)) |
| | return 0; |
| | num_active_games = 0; |
| | Network_games_changed = 0; |
| | Network_status = NETSTAT_BROWSING; |
| | memset(Active_games, 0, sizeof(netgame_info)*MAX_ACTIVE_NETGAMES); |
| | |
| | nextsend=0;numsent=0; |
| | |
| | while (1){ |
| | curtime=timer_get_fixed_seconds(); |
| | if (nextsend<curtime){ |
| | if (numsent>=5) |
| | return 0;//timeout |
| | nextsend=curtime+F1_0*3; |
| | numsent++; |
| | mprintf((0, "Sending game_list request.\n")); |
| | memcpy( me.player.callsign, Players[Player_num].callsign, CALLSIGN_LEN+1 ); |
| | memcpy( me.player.node, ipx_get_my_local_address(), 6 ); |
| | memcpy( me.player.server, ipx_get_my_server_address(), 4 ); |
| | me.type = PID_D1X_GAME_INFO_REQ;//get full info. |
| | |
| | send_sequence_packet( me, server,node,net_address); |
| | } |
| | |
| | network_listen(); |
| | |
| | if (Network_games_changed){ |
| | if (num_active_games<1){ |
| | Network_games_changed=0; |
| | continue; |
| | } |
| | if (show_game_stats(Active_games[0],1)) |
| | return (network_do_join_game(&Active_games[0])); |
| | else |
| | return 0; |
| | } |
| | if (key_inkey()==KEY_ESC) |
| | return 0; |
| | |
| | } |
| | return 0; |
| | } |
| | //end addition -MM |
| | |
//added on 1/5/99 by Victor Rachels for missiondir | | //added on 1/5/99 by Victor Rachels for missiondir |
void change_missiondir() | | void change_missiondir() |
{ | | { |
| | |
case KEY_I: //I = 0x17 | | case KEY_I: //I = 0x17 |
if(selected_game<num_active_games) | | if(selected_game<num_active_games) |
{ | | { |
show_game_stats(Active_games[selected_game]); | | show_game_stats(Active_games[selected_game],0); |
netlist_redraw(bg,menu_text,lis); | | netlist_redraw(bg,menu_text,lis); |
old_socket = -32768; | | old_socket = -32768; |
old_select = -1; | | old_select = -1; |