]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/util.cxx
Moved some of the low level scene graph construction code over to simgear.
[flightgear.git] / src / Main / util.cxx
index 61e0681654dde59ba06a15967d8b7f67b7740ba8..4e952685b5033e925902793a666bb3df6d16fd13 100644 (file)
 
 
 #include <math.h>
+
+#include <simgear/debug/logstream.hxx>
+
+#include "fg_io.hxx"
+#include "fg_props.hxx"
+#include "globals.hxx"
 #include "util.hxx"
 
+#if defined(FG_NETWORK_OLK)
+#include <NetworkOLK/network.h>
+#endif
+
+
+void
+fgExit (int status)
+{
+    SG_LOG(SG_GENERAL, SG_INFO, "Exiting FlightGear with status " << status);
+
+#if defined(FG_NETWORK_OLK)
+    if (fgGetBool("/sim/networking/network-olk"))
+       fgd_send_com("8", FGFS_host);
+#endif
+
+    globals->get_io()->shutdown_all();
+    exit(status);
+}
+
 
 // Originally written by Alex Perry.
 double