#include <Math/fg_random.h>
#include <Math/mat3.h>
#include <Math/polar3d.hxx>
-#include <Network/network.h>
+#include <NetworkOLK/network.h>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
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();
+ }
+#endif
+
+
// temporary
extern bool fgAPAltitudeEnabled( void );
extern bool fgAPHeadingEnabled( void );
endif
if ENABLE_OLD_WEATHER
-WEATHER_LIBS = $(top_builddir)/Simulator/Weather/libWeather.a
+WEATHER_LIBS = $(top_builddir)/Simulator/Weather/libWeather.a
else
-WEATHER_LIBS = $(top_builddir)/Simulator/WeatherCM/libWeatherCM.a
+WEATHER_LIBS = $(top_builddir)/Simulator/WeatherCM/libWeatherCM.a
+endif
+
+if ENABLE_NETWORK_OLK
+NETWORK_LIBS = \
+ $(top_builddir)/Simulator/Network/libNetwork.a \
+ $(top_builddir)/Simulator/NetworkOLK/libNetworkOLK.a
+else
+NETWORK_LIBS = \
+ $(top_builddir)/Simulator/Network/libNetwork.a
endif
if OLD_AUTOMAKE
$(top_builddir)/Simulator/GUI/libGUI.a \
$(top_builddir)/Simulator/Scenery/libScenery.a \
$(top_builddir)/Simulator/Airports/libAirports.a \
- $(top_builddir)/Simulator/Network/libNetwork.a \
+ $(NETWORK_LIBS) \
$(top_builddir)/Simulator/Objects/libObjects.a \
$(top_builddir)/Simulator/Clouds/libClouds.a \
$(top_builddir)/Simulator/Time/libTime.a \
#include <Math/fg_random.h>
#include <Misc/fgpath.hxx>
#ifdef FG_NETWORK_OLK
-#include <Network/network.h>
+#include <NetworkOLK/network.h>
#endif
#include <Objects/materialmgr.hxx>
#include <Scenery/scenery.hxx>
ssgSelector *penguin_sel = NULL;
ssgTransform *penguin_pos = NULL;
+#ifdef FG_NETWORK_OLK
+ssgSelector *fgd_sel = NULL;
+ssgTransform *fgd_pos = NULL;
+//sgMat4 sgTUX;
+#endif
+
// current fdm/position used for view
FGInterface cur_view_fdm;
}
// update fog params if visibility has changed
+#ifndef FG_OLD_WEATHER
double cur_visibility = WeatherDatabase->getWeatherVisibility();
+#else
+ double cur_visibility = current_weather.get_visibility();
+#endif
double actual_visibility = cur_visibility;
if ( current_options.get_clouds() ) {
penguin_pos->setTransform( &tuxpos );
}
+# ifdef FG_NETWORK_OLK
+ sgCoord fgdpos;
+ other = head->next; /* put listpointer to start */
+ while ( other != tail) { /* display all except myself */
+ if ( strcmp( other->ipadr, fgd_mcp_ip) != 0) {
+ other->fgd_sel->select(1);
+ sgSetCoord( &fgdpos, other->sgFGD_COORD );
+ other->fgd_pos->setTransform( &fgdpos );
+ }
+ other = other->next;
+ }
+
+ // fgd_sel->select(1);
+ // sgCopyMat4( sgTUX, current_view.sgVIEW);
+ // sgCoord fgdpos;
+ // sgSetCoord( &fgdpos, sgFGD_VIEW );
+ // fgd_pos->setTransform( &fgdpos);
+# endif
+
ssgSetCamera( current_view.VIEW );
// position tile nodes and update range selectors
FG_LOG( FG_ALL, FG_DEBUG, "Running Main Loop");
FG_LOG( FG_ALL, FG_DEBUG, "======= ==== ====");
+#ifdef FG_NETWORK_OLK
+ if ( net_is_registered == 0 ) { // We first have to reg. to fgd
+ // printf("FGD: Netupdate\n");
+ fgd_send_com( "A", FGFS_host); // Send Mat4 data
+ fgd_send_com( "B", FGFS_host); // Recv Mat4 data
+ }
+#endif
+
#if defined( ENABLE_PLIB_JOYSTICK )
// Read joystick and update control settings
if ( current_options.get_control_mode() == fgOPTIONS::FG_JOYSTICK ) {
#ifdef FG_NETWORK_OLK
// Do the network intialization
- printf("Multipilot mode %s\n", fg_net_init() );
+ printf("Multipilot mode %s\n", fg_net_init( scene ) );
#endif
scene->addKid( terrain );