diff --git a/src/Cockpit/hud.cxx b/src/Cockpit/hud.cxx index d1e3c1f01..91da17d59 100644 --- a/src/Cockpit/hud.cxx +++ b/src/Cockpit/hud.cxx @@ -1105,7 +1105,7 @@ void fgUpdateHUD( void ) { char *gmt_str = get_formated_gmt_time(); HUD_TextList.add( fgText( 40, 10, gmt_str) ); - + #ifdef FG_NETWORK_OLK if ( net_hud_display ) { net_hud_update(); diff --git a/src/GUI/gui.cxx b/src/GUI/gui.cxx index 165a00c1f..8c130f24c 100644 --- a/src/GUI/gui.cxx +++ b/src/GUI/gui.cxx @@ -539,13 +539,16 @@ void NetIdDialog_OK (puObject *) int PauseMode = t->getPause(); if(!PauseMode) t->togglePauseMode(); - - char *s; - NetIdDialogInput->getValue(&s); - NetId = s; +/* + The following needs some cleanup because + "string options.NetId" and "char *net_callsign" +*/ + NetIdDialogInput->getValue(&net_callsign); + NetId = net_callsign; NetIdDialog_Cancel( NULL ); current_options.set_net_id( NetId.c_str() ); +/* Entering a callsign indicates : user wants Net HUD Info */ net_hud_display = 1; if( PauseMode != t->getPause() ) @@ -592,6 +595,13 @@ static void NewNetIdInit(void) static void net_display_toggle( puObject *cb) { net_hud_display = (net_hud_display) ? 0 : 1; + printf("Toggle net_hud_display : %d\n", net_hud_display); +} + +static void net_blaster_toggle( puObject *cb) +{ + net_blast_toggle = (net_blast_toggle) ? 0 : -1; + printf("Toggle net_blast : %d\n", net_blast_toggle); } /*************** End Networking **************/ @@ -646,11 +656,12 @@ puCallback optionsSubmenuCb [] = { #ifdef FG_NETWORK_OLK char *networkSubmenu [] = { "Unregister from FGD ", "Send MSG to All", "Send MSG", "Show Pilots", "Register to FGD", - "Scan for Deamons", "Enter Callsign", "Display Netinfos", "Toggle Display", NULL + "Scan for Deamons", "Enter Callsign", "Display Netinfos", "Toggle Display", + "Hyper Blast", NULL }; puCallback networkSubmenuCb [] = { notCb, notCb, notCb, notCb, notCb, notCb, NewCallSign, notCb, - net_display_toggle, NULL + net_display_toggle, net_blaster_toggle, NULL }; #endif diff --git a/src/Main/main.cxx b/src/Main/main.cxx index ab70ba57b..254f8595f 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -81,6 +81,9 @@ #include #include #include +#ifdef FG_NETWORK_OLK +#include +#endif #include #include #include @@ -1121,6 +1124,11 @@ int main( int argc, char **argv ) { ssgFlatten( tux_obj ); ssgStripify( penguin_sel ); +#ifdef FG_NETWORK_OLK + // Do the network intialization + printf("Multipilot mode %s\n", fg_net_init() ); +#endif + scene->addKid( terrain ); scene->addKid( penguin_sel ); diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 286776c71..89abbfc4f 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -44,6 +44,9 @@ bool global_fullscreen = true; #include #include #include +#ifdef FG_NETWORK_OLK +# include +#endif #include