Trying to get the new moving dock code to work. But have another issue. I can't seem to find what is happening.
For the dock ring animation I have this:
where is where it is saved:
The scenario starts out:
and run the scenario and not pressing any keys
I get this:
For the dock ring animation I have this:
if (TUNNELODS == 1) {//ODS is present
if (APAS_status >= DOCK_RAISING) {
double da = simdt * .1;
if (APAS_status == DOCK_RAISING) {
if (soft_capture_ring_proc > 0.0) soft_capture_ring_proc = max(0.0, soft_capture_ring_proc - da);
else APAS_status = DOCK_UP;
}
else {
if (soft_capture_ring_proc < 1.0) soft_capture_ring_proc = min(1.0, soft_capture_ring_proc + da);
else APAS_status = DOCK_DOWN;
}
SetAnimation(anim_DOCKRING, soft_capture_ring_proc);
//SetAnimation(anim_rods, soft_capture_ring_proc);
CalculateRodAnimation();
//DoIDARing();
}
}
enum APAS_status { DOCK_UP, DOCK_DOWN, DOCK_RAISING, DOCK_LOWERING }APAS_status;
void Atlantis::RevertDockingRing(void) {
APAS_status = ((APAS_status == DOCK_UP || APAS_status == DOCK_RAISING) ?
DOCK_LOWERING : DOCK_RAISING);
}
APAS_status = DOCK_UP;where is where it is saved:
sprintf(cbuf, "%d %0.4f", &APAS_status, &soft_capture_ring_proc);
oapiWriteScenario_string(scn, "DOCKAPAS", cbuf);
and read:
else if (!_strnicmp(line, "DOCKAPAS", 8)) {
sscanf(line + 8, "%d%lf", &APAS_status, &soft_capture_ring_proc);
}
The scenario starts out:
DOCKAPAS 0 0.0000and run the scenario and not pressing any keys
I get this:
DOCKAPAS 385911332 0.0000

