]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/protocol.cxx
Moved random ground cover object management code (userdata.[ch]xx) over
[flightgear.git] / src / Network / protocol.cxx
index ea1e66678123bebd40ed28c96d3372a28acf8b5f..e505bd5d582cc1f14ea4f50fcad1a9bbc2bf7955 100644 (file)
@@ -29,7 +29,8 @@
 
 FGProtocol::FGProtocol() :
     hz(0.0),
-    count_down(0),
+    count_down(0.0),
+    count(0),
     enabled(false)
 {
 }
@@ -95,3 +96,14 @@ bool FGProtocol::parse_message() {
 }
 
 
+void FGProtocol::set_direction( const string& d ) {
+    if ( d == "in" ) {
+       dir = SG_IO_IN;
+    } else if ( d == "out" ) {
+       dir = SG_IO_OUT;
+    } else if ( d == "bi" ) {
+       dir = SG_IO_BI;
+    } else {
+       dir = SG_IO_NONE;
+    }
+}