See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: Multiple airlocks ummu help  (Read 553 times)

0 Members and 1 Guest are viewing this topic.

Offline gattico

  • Sr. Member
  • ****
  • Posts: 291
  • Country: United States us
  • Karma: 4
11 February 2018, 12:52:39
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: [Select]
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;
}
}

select which door/airlock
Code: [Select]
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;
}


Code: [Select]
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();
}
}