1
0
Fork 0
flightgear/src/Main/fgfs.cxx
david 5a849b66e8 Major overhaul:
- changed FGSubsystem::update(int) to
  FGSubsystem::update(delta_time_sec); the argument is now delta time
  in seconds rather than milliseconds

- added FGSubsystem::suspend(), FGSubsystem::suspend(bool),
  FGSubsystem::resume(), and FGSubsystem::is_suspended(), all with
  default implementations; is_suspended takes account of the master
  freeze as well as the subsystem's individual suspended state

- the FDMs now use the delta time argument the same as the rest of
  FlightGear; formerly, main.cxx made a special case and passed a
  multiloop argument

- FDMs now calculate multiloop internally instead of relying on
  main.cxx

There are probably some problems -- I've done basic testing with the
major FDMs and subsystems, but we'll probably need a few weeks to
sniff out bugs.
2002-05-11 16:28:50 +00:00

50 lines
791 B
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "fgfs.hxx"
#include <simgear/debug/logstream.hxx>
#include "globals.hxx"
#include "fg_props.hxx"
////////////////////////////////////////////////////////////////////////
// Implementation of FGSubsystem
////////////////////////////////////////////////////////////////////////
FGSubsystem::FGSubsystem ()
: _suspended(false)
{
}
FGSubsystem::~FGSubsystem ()
{
}
void
FGSubsystem::suspend ()
{
_suspended = true;
}
void
FGSubsystem::suspend (bool suspended)
{
_suspended = suspended;
}
void
FGSubsystem::resume ()
{
_suspended = false;
}
bool
FGSubsystem::is_suspended () const
{
if (!_freeze_master_node.valid())
_freeze_master_node = fgGetNode("/sim/freeze/master", true);
return _suspended || _freeze_master_node->getBoolValue();
}
// end of fgfs.cxx