]> git.mxchange.org Git - flightgear.git/commitdiff
etxtend "pause" command to force pause/continue
authorTorsten Dreyer <torsten@ŧ3r.de>
Sat, 14 Mar 2015 21:33:06 +0000 (22:33 +0100)
committerTorsten Dreyer <torsten@ŧ3r.de>
Sat, 14 Mar 2015 21:33:06 +0000 (22:33 +0100)
src/Main/fg_commands.cxx

index 8c9539f5da336d9d0b16337c0a3ca815543bcd27..fa303dde4643bf1002c17c036ed9166d199f4385 100644 (file)
@@ -248,7 +248,14 @@ do_replay (const SGPropertyNode * arg)
 static bool
 do_pause (const SGPropertyNode * arg)
 {
+    bool forcePause = arg->getBoolValue("force-pause", false );
+    bool forcePlay = arg->getBoolValue("force-play", false );
+
     bool paused = fgGetBool("/sim/freeze/master",true) || fgGetBool("/sim/freeze/clock",true);
+
+    if(forcePause) paused = false;
+    if(forcePlay) paused = true;
+
     if (paused && (fgGetInt("/sim/freeze/replay-state",0)>0))
     {
         do_replay(NULL);