X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FUIUCModel%2Fuiuc_wrapper.cpp;h=47897560e644e1d9e919b437116e4b4c866dc62b;hb=f04d5f8758ef4b5524a9396a84351bf86db6763e;hp=a2e57c7ff0b8b0c216e608694628bf719cf70f8c;hpb=e769f42f3b6bf3275a7724d9ef2e01e2073b5c27;p=flightgear.git diff --git a/src/FDM/UIUCModel/uiuc_wrapper.cpp b/src/FDM/UIUCModel/uiuc_wrapper.cpp index a2e57c7ff..47897560e 100644 --- a/src/FDM/UIUCModel/uiuc_wrapper.cpp +++ b/src/FDM/UIUCModel/uiuc_wrapper.cpp @@ -71,21 +71,22 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA or view http://www.gnu.org/copyleft/gpl.html. - + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + **********************************************************************/ #ifdef HAVE_CONFIG_H # include #endif +#include +#include + #include #include -#include #include
#include "uiuc_aircraft.h" @@ -103,9 +104,6 @@ //#include "uiuc_network.h" #include "uiuc_get_flapper.h" -SG_USING_STD(cout); -SG_USING_STD(endl); - extern "C" void uiuc_initial_init (); extern "C" void uiuc_defaults_inits (); extern "C" void uiuc_vel_init (); @@ -118,7 +116,7 @@ extern "C" void uiuc_record_routine(double dt); extern "C" void uiuc_network_recv_routine(); extern "C" void uiuc_network_send_routine(); -AIRCRAFT *aircraft_ = new AIRCRAFT; +AIRCRAFT *aircraft_ = 0; // SendArray testarray(4950); @@ -161,6 +159,9 @@ void uiuc_initial_init () void uiuc_defaults_inits () { + if (aircraft_ == 0) + aircraft_ = new AIRCRAFT; + // set defaults and initialize (called once from uiuc_init_2_wrapper) //fog inits @@ -321,7 +322,7 @@ void uiuc_init_aeromodel () SGPath path(globals->get_fg_root()); path.append(fgGetString("/sim/aircraft-dir")); path.append("aircraft.dat"); - cout << "We are using "<< path.str() << endl; + std::cout << "We are using "<< path.str() << std::endl; uiuc_initializemaps(); // Initialize the maps uiuc_menu(path.str()); // Read the specified aircraft file }