Include Artlav's Autotime in future OpenOrbiter release

There was some discussion about possibly including Face's SoundBridge in the OpenOrbiter distribution and installing it alongside XRSound by default, but I don't know what the status of that is.
 
There was some discussion about possibly including Face's SoundBridge in the OpenOrbiter distribution and installing it alongside XRSound by default, but I don't know what the status of that is.
Well, the open sourcing of SoundBridge depends on the approval of DanSteph. Unfortunately he has not replied to my request, and it also seems like he is not visiting his own forum that much anymore. I think he more or less left Orbiter for good. However, I would certainly not object if the binary is distributed along with OpenOrbiter.

However, I think this is misleading on the subject, anyway. Ripley talks about a feature that the central OrbiterSound DLL offered. SoundBridge is not replicating everything that DLL offered, only acts as a bridge for the SoundSDK interface. Of course it would be possible to implement it there, but it is not there yet.
 
I don't see why a feature to disable autopilots when timewarping should be linked to a (any) sound module.
Dansteph opted to do so, and it's ok, but my request didn't imply that.
It could as well be a flag in the Launchpad.
Artlav's solution was more precise, as one could decide the timewarp threshold at which disengaging autopilots, by means of a config file.
 
Last edited:
I sure don't mind.
And the whole thing was like 50 lines of code - shouldn't be too hard to recreate or incorporate.

Code:
//############################################################################//
#define STRICT
#define ORBITER_MODULE
#include "orbitersdk.h"
double max_accel;
//############################################################################//
DLLCLBK void InitModule (HINSTANCE hDLL)
{
 FILE *fp;
 char buf[255],val[255];
 int i;

 max_accel=100;

 if((fp=fopen("Config\\autotime.cfg","r"))==NULL){
 }else{
  i=0;
  while(!feof(fp)&&i++<100){
   fscanf(fp,"%[^=]=%[^=^\n]\n",buf,val);
   if(!strcmp(buf,"autopilot_accel_limit"))max_accel=atoi(val);
  }
  fclose(fp);
 }
}   
//############################################################################//
DLLCLBK void ExitModule(HINSTANCE hDLL){}
//############################################################################//
void clear_acc()
{
 VESSEL *f;
 if(oapiGetTimeAcceleration()>max_accel){
  f=oapiGetFocusInterface();
  if(f){
   f->DeactivateNavmode(NAVMODE_KILLROT);
   f->DeactivateNavmode(NAVMODE_HLEVEL);
   f->DeactivateNavmode(NAVMODE_PROGRADE);
   f->DeactivateNavmode(NAVMODE_RETROGRADE);
   f->DeactivateNavmode(NAVMODE_NORMAL);
   f->DeactivateNavmode(NAVMODE_ANTINORMAL);
   f->DeactivateNavmode(NAVMODE_HOLDALT); 
  }
 }
}  
//############################################################################//
DLLCLBK void opcPreStep(double simt,double simdt,double mjd){clear_acc();}  
DLLCLBK void opcPostStep(double simt,double simdt,double mjd){clear_acc();}  
//############################################################################//
 
Back
Top