]> git.mxchange.org Git - flightgear.git/blobdiff - src/NetworkOLK/net_send.cxx
Don't scale elevator by 0.5.
[flightgear.git] / src / NetworkOLK / net_send.cxx
index 06b3f2641a82551a6f907ccf9bdca3b482d3c0f8..78896882892bc705cbfbb964ecd44d821e428276 100644 (file)
@@ -42,6 +42,7 @@
 #include <plib/ssg.h>
 #include <Main/globals.hxx>
 #include <Main/viewmgr.hxx>
+#include <Model/loader.hxx>
 
 //#define printf //
 
@@ -162,7 +163,7 @@ struct list_ele *new_ele;
    new_ele->fgd_sel = new ssgSelector;
    new_ele->fgd_pos = new ssgTransform;
 
-   ssgEntity *fgd_obj = ssgLoadAC( "tuxcopter.ac" );
+   ssgEntity *fgd_obj = globals->get_model_loader()->load_model( "tuxcopter.ac" );
    fgd_obj->clrTraversalMaskBits( SSGTRAV_HOT );
    new_ele->fgd_pos->addKid( fgd_obj );
    new_ele->fgd_sel->addKid( new_ele->fgd_pos );
@@ -259,7 +260,7 @@ void fgd_init(void){
 /* determinating the source/sending host */
    if (uname(&myname) == 0) strcpy(src_host , myname.nodename);   
    printf("MCP: I'm running on HOST : %s  ", src_host);
-   if (host_info = gethostbyname( src_host)) {
+   if ( (host_info = gethostbyname( src_host)) != NULL ) {
      bcopy(host_info->h_addr, (char *)&address.sin_addr,host_info->h_length);
      strcpy((char *) fgd_mcp_ip, (char *) inet_ntoa(address.sin_addr));
      }
@@ -267,7 +268,7 @@ void fgd_init(void){
    FGFS_host = src_host;
 /* resolving the destination host, here fgd's host */   
    if (verbose == 2) printf("     Resolving default DEAMON: %s ->", fgd_host);
-   if (host_info = gethostbyname( fgd_host)) {
+   if ( (host_info = gethostbyname( fgd_host)) != NULL ) {
      bcopy(host_info->h_addr, (char *)&address.sin_addr,host_info->h_length);
      strcpy((char *) fgd_ip, (char *) inet_ntoa(address.sin_addr));
      if (verbose == 2) {
@@ -295,7 +296,7 @@ int net_resolv_fgd( char *fgd_host_check ) {
 /* resolving the destination host, here fgd's host */   
    net_r = 0;
    if (verbose == 2) printf("     Resolving default DEAMON: %s ->", fgd_host_check);
-   if (host_info = gethostbyname( fgd_host_check)) {
+   if ( (host_info = gethostbyname( fgd_host_check)) != NULL ) {
      bcopy(host_info->h_addr, (char *)&address.sin_addr,host_info->h_length);
      strcpy((char *) fgd_ip_check, (char *) inet_ntoa(address.sin_addr));
      fgd_ip = fgd_ip_check;