Warning 1 warning MSB8012: TargetPath(C:\orbiter100830\Orbitersdk\samples\WORMGATE1\..\..\..\Modules\wormgate.dll) does not match the Linker's OutputFile property value (C:\orbiter100830\Modules\wormgatenew.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
What was odd is the release dll was a different name than the debug that was why it would not break:
Warning 3 warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification C:\orbiter100830\Orbitersdk\samples\WORMGATE1\NEWW ORM2.obj 1 1 wormgate
A release build won't trigger breakpoints at all.
It might be -17 and then then next cycle 20. So it would have never set the jump based off the z
I attached the latest files earlier on post 222
In any case, that you are now seeing reasonable values does indeed indicate that the compiler settings in your old project were thouroughly messed up for a debug build. Glad we sorted that out.
This begs the question how do you set up a new project?
I guess the next step is if x, y, z rel position is within range do something, right?
(-500<gaterelative_pos.x) && (gaterelative_pos.x>500)
Thanks. So I have basically this:
isn't this if gaterelative_pos.x greater than -500 AND gaterelative_pos.x less than 500Code:(-500<gaterelative_pos.x) && (gaterelative_pos.x>500)
if (((gaterelative_pos.x > -500) && (gaterelative_pos.x > 500)) && ((gaterelative_pos.y > -500) && (gaterelative_pos.y > 500)) && ((gaterelative_pos.z > -10) && (gaterelative_pos.z > 10)))
if (((gaterelative_pos.x > -500) && (gaterelative_pos.x < 500)) && ((gaterelative_pos.y > -500) && (gaterelative_pos.y < 500)) && ((gaterelative_pos.z > -10) && (gaterelative_pos.z < 10)))
if (((gaterelative_pos.x > -500) && (gaterelative_pos.x < 500)) && ((gaterelative_pos.y > -500) && (gaterelative_pos.y < 500)) && ((gaterelative_pos.z > -10) && (gaterelative_pos.z < 10)))
//if ((-500<gaterelative_pos.x>500) && (-500<gaterelative_pos.y>500) && (-10<gaterelative_pos.z>10))//ship is near gate and key pressed
{
VESSELSTATUS2 vs_vessel, vs_other_gate;
memset(&vs_vessel, 0, sizeof(vs_vessel));
memset(&vs_other_gate, 0, sizeof(vs_other_gate));
vs_vessel.version = 2;
vs_other_gate.version = 2;
VESSEL *v;
v = oapiGetVesselInterface(hvessel);
v->GetStatusEx(&vs_vessel);
OBJHANDLE h_other_gate;
char myname[16];
char GateA[16];
sprintf(myname, GetName());
sprintf(GateA, "Gate_A");
if (strcmp(myname, GateA) == 0)
{
h_other_gate = oapiGetVesselByName("Gate_B");
}
else{
h_other_gate = oapiGetVesselByName("Gate_A");
}
VESSEL *v_other_gate;
v_other_gate = oapiGetVesselInterface(h_other_gate);
v_other_gate->GetStatusEx(&vs_other_gate);
vs_vessel.rbody = vs_other_gate.rbody;
vs_vessel.rpos = vs_other_gate.rpos;
vs_vessel.vrot = vs_other_gate.vrot;
vs_vessel.arot = vs_other_gate.arot;
VECTOR3 outvel = _V(rvel.x, rvel.y, rvel.z);
VECTOR3 rofs;
GlobalRot(outvel, rofs);
vs_vessel.rvel.x = vs_other_gate.rvel.x + rofs.x;
vs_vessel.rvel.y = vs_other_gate.rvel.y + rofs.y;
vs_vessel.rvel.z = vs_other_gate.rvel.z + rofs.z;
jump = false;
v->DefSetStateEx(&vs_vessel);
}
double r_squared = pow(gaterelative_pos.x, 2) + pow(gaterelative_pos.y, 2);
if ((r_squared < GATE_RADIUS_SQUARED) && (gaterelative_pos.z > -10) && (gaterelative_pos.z < 10))
const double GATE_RADIUS = 500.0;
const double GATE_RADIUS_SQUARED = pow(GATE_RADIUS, 2);
One thing I did notice was when you jump the speed is zero when you come thru.
VECTOR3 outvel = _V(rvel.x, rvel.y, rvel.z);
VECTOR3 rofs;
GlobalRot(outvel, rofs);
vs_vessel.rvel.x = vs_other_gate.rvel.x + rofs.x;
vs_vessel.rvel.y = vs_other_gate.rvel.y + rofs.y;
vs_vessel.rvel.z = vs_other_gate.rvel.z + rofs.z;
vs_vessel.rvel.x = vs_other_gate.rvel.x + rofs.x;
BEGIN_SHIPS
Gate_A:WORMHOLE
STATUS Orbiting Earth
RPOS 1405568.71 -0.02 6865713.13
RVEL -7388.442 -0.000 1512.585
AROT 0.00 -0.00 0.00
AFCMODE 7
NAVFREQ 0 0
XPDR 0
END
Gate_B:WORMHOLE
STATUS Orbiting Moon
RPOS 1591445.99 1496805.63 169749.37
RVEL 883.910 879.877 30.203
AROT 0.00 -0.00 0.00
AFCMODE 7
NAVFREQ 0 0
XPDR 0
END
dg:Deltaglider
STATUS Orbiting Earth
RPOS 1405567.75 -0.02 6865520.24
RVEL -7388.466 -0.000 1546.626
AROT 0.00 -0.00 0.00
RCSMODE 2
AFCMODE 7
PRPLEVEL 0:0.983452 1:0.992303
THLEVEL 0:0.122449 1:0.122449
NAVFREQ 0 0 0 0
XPDR 0
AAP 0:0 0:0 0:0
END
END_SHIPS
BEGIN_SHIPS
Gate_A:WORMHOLE
STATUS Orbiting Earth
RPOS 1362282.34 -0.02 6874432.88
RVEL -7397.825 -0.000 1466.003
AROT 0.00 -0.00 0.00
AFCMODE 7
NAVFREQ 0 0
XPDR 0
END
Gate_B:WORMHOLE
STATUS Orbiting Moon
RPOS 1596608.53 1501945.31 169924.86
RVEL 879.583 875.807 29.742
AROT 0.00 -0.00 0.00
AFCMODE 7
NAVFREQ 0 0
XPDR 0
END
dg:Deltaglider
STATUS Orbiting Moon
RPOS 1588093.00 1501043.48 171454.83
RVEL -7396.982 -0.716 1517.601
AROT 0.00 -0.00 0.00
RCSMODE 2
AFCMODE 7
PRPLEVEL 0:0.983008 1:0.992303
THLEVEL 0:0.122449 1:0.122449
NAVFREQ 0 0 0 0
XPDR 0
AAP 0:0 0:0 0:0
END