Have you called SetStationMesh after adding the astronaut? After adding an astronaut, you should call SetEmptyMass and SetStationMesh to update the vessel mass and set the astronaut mesh. Same after egressing and deleting an astronaut.Not sure if I have this correct. Here I added a guy but not seen until I reload?
FLEX:FLEXUACS ASTR_STATION 0 ASTR_NAME John G. ASTR_ROLE Pilot ASTR_MASS 70.000000 ASTR_OXYGEN 0.999275 ASTR_FUEL 1.000000 ASTR_ALIVE 1 ASTR_CLASSNAME UACS\Astronauts\Xemuredbroke ASTR_STATION 1 ASTR_NAME Abdullah Radwan ASTR_ROLE Commander ASTR_MASS 70.000000 ASTR_OXYGEN 1.000000 ASTR_FUEL 1.000000 ASTR_ALIVE 1 ASTR_CLASSNAME UACS\Astronauts\Xemured
void FLEXUACS::clbkPostCreation () { mdlAPI.clbkPostCreation(); for (size_t idx{}; idx < vslAstrInfo.stations.size(); ++idx) { if (!vslAstrInfo.stations.at(idx).astrInfo) continue; const auto& astrInfo = *vslAstrInfo.stations.at(idx).astrInfo; SetEmptyMass(GetEmptyMass() + astrInfo.mass); SetStationMesh(idx, astrInfo.role, true); } } void FLEXUACS::SetStationMesh(size_t stationIdx, std::string_view role, bool show) { switch (stationIdx) { case 0://left // Show first station commander mesh if (role == "Commander") SetMeshVisibilityMode(6, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); // Show first station pilot mesh else if (role == "Pilot") SetMeshVisibilityMode(5, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); break; case 1://right // Show second station commander mesh if (role == "Commander") SetMeshVisibilityMode(4, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); // Show second station pilot mesh else if (role == "Pilot") SetMeshVisibilityMode(7, show ? MESHVIS_ALWAYS : MESHVIS_NEVER); break; } }
EDIT: Looking back, it seems like I forgot to make the API call clbkGeneric with ASTR_INGRS when an astronaut is added and with ASTR_EGRS when the vessel transfers the astronaut to another vessel. I will do in the next update. This makes it necessary to call SetEmptyMass and SetStationMesh only when deleting an astronaut, as the deletion is done by the vessel by setting the astrInfo in the station to nullopt, instead of calling an API method.
Until the next update, you have to call the SetEmptyMass and SetStationMesh manually after the addition.
Last edited: