Orbiter English > Orbiter English

Multiple airlocks ummu help

(1/1)

gattico:
So I have this.   on the upper/lower airlocks it will put the guy where it needs to be but when you switch to the guy it says airlock too far away.

--- Code: ---void LANDER6::SetUMMUAirlockPos(void)
{
int AirlockStatus = Crew.GetAirlockDoorState();
Crew.SetActiveDockForTransfer(iActiveDockNumber);
switch (iActiveDockNumber)
{
case 0: //LEFT
Crew.DefineAirLockShape(AirlockStatus, -6, -2, -4, 3, 6, 9);
Crew.SetMembersPosRotOnEVA(_V(-4.5, 1.179, 7.6), _V(0, -1.5, 0));

doorselected = 0;
break;
case 1: //RIGHT
Crew.DefineAirLockShape(AirlockStatus, 6, 2, -4, 3, 6, 9);
Crew.SetMembersPosRotOnEVA(_V(4.5, 1.179, 7.6), _V(0, 1.5, 0));
doorselected = 1;
break;
case 2: //top
Crew.DefineAirLockShape(AirlockStatus, 1,- 1, 0, 8.5, -1, 2);
Crew.SetMembersPosRotOnEVA(_V(0, 5.5, 0), _V(0, 1.5, 0));
doorselected = 2;
break;
case 3: //bottom
Crew.DefineAirLockShape(AirlockStatus, 1, -1, -4, 3, -1, 2);
Crew.SetMembersPosRotOnEVA(_V(0, 1.179, 0), _V(0, 1.5, 0));
doorselected = 3;
break;
}
}
--- End code ---

select which door/airlock

--- Code: ---else if (key == OAPI_KEY_9)
{
if (iActiveDockNumber>0)
iActiveDockNumber--;
//   sprintf(SendHudMessage(),"Active dock number changed to: %i",iActiveDockNumber);
if (iActiveDockNumber == 0) (SendHudMessage("Left Airlock Selected"));
if (iActiveDockNumber == 1) (SendHudMessage("Right Airlock Selected"));
if (iActiveDockNumber == 2) (SendHudMessage("Upper Airlock Selected"));
if (iActiveDockNumber == 3) (SendHudMessage("Lower Airlock Selected"));


SetUMMUAirlockPos();
return 1;
}
//---------------------------------------------------------------------------
// change active dock
else if (key == OAPI_KEY_0)
{
if (iActiveDockNumber<3)
iActiveDockNumber++;
//   sprintf(SendHudMessage(),"Active dock number changed to: %i",iActiveDockNumber);
if (iActiveDockNumber == 0) (SendHudMessage("Left Airlock Selected"));
if (iActiveDockNumber == 1) (SendHudMessage("Right Airlock Selected"));
if (iActiveDockNumber == 2) (SendHudMessage("Upper Airlock Selected"));
if (iActiveDockNumber == 3) (SendHudMessage("Lower Airlock Selected"));


SetUMMUAirlockPos();
return 1;
}
--- End code ---



--- Code: --- else if (key == OAPI_KEY_BACKSLASH )
{
//
Crew.SetAirlockDoorState(!Crew.GetAirlockDoorState());
// display state
SetUMMUAirlockPos();
if (doorselected == 1)
{
//RevertDOOR();
//doorselected = 1;
//iActiveDockNumber = 1;
// SetUMMUAirlockPos();
if (Crew.GetAirlockDoorState() == TRUE)
SendHudMessage("Right Airlock is now open");
else
SendHudMessage("Right Airlock is now closed");
RevertDOOR();
}
else if (doorselected == 0)

{
//RevertDOOR1();
//doorselected = 0;
//iActiveDockNumber = 0;
//SetUMMUAirlockPos();
if (Crew.GetAirlockDoorState() == TRUE)
SendHudMessage("Left Airlock is now open");
else
SendHudMessage("Left Airlock is now closed");
RevertDOOR1();
}
else if (doorselected == 2)

{
//RevertDOOR1();
//doorselected = 0;
//iActiveDockNumber = 0;
//SetUMMUAirlockPos();
if (Crew.GetAirlockDoorState() == TRUE)
SendHudMessage("Upper Airlock is now open");
else
SendHudMessage("Upper Airlock is now closed");
RevertUPPERDOCKDOOR();
}
else if (doorselected == 3)

{
//RevertDOOR1();
//doorselected = 0;
//iActiveDockNumber = 0;
//SetUMMUAirlockPos();
if (Crew.GetAirlockDoorState() == TRUE)
SendHudMessage("Lower Airlock is now open");
else
SendHudMessage("Lower Airlock is now closed");
RevertLOWERDOCKDOOR();
}
}
--- End code ---

Navigation

[0] Message Index

Go to full version