0 Members and 1 Guest are viewing this topic.
th_att_rot[0] = th_att_lin[0] = CreateThruster (_V(0,0, 8), _V(0, 1,0), MAXRCSTH, hpr, ISP); th_att_rot[1] = th_att_lin[3] = CreateThruster (_V(0,0,-8), _V(0,-1,0), MAXRCSTH, hpr, ISP); th_att_rot[2] = th_att_lin[2] = CreateThruster (_V(0,0, 8), _V(0,-1,0), MAXRCSTH, hpr, ISP); th_att_rot[3] = th_att_lin[1] = CreateThruster (_V(0,0,-8), _V(0, 1,0), MAXRCSTH, hpr, ISP); CreateThrusterGroup (th_att_rot, 2, THGROUP_ATT_PITCHUP); CreateThrusterGroup (th_att_rot+2, 2, THGROUP_ATT_PITCHDOWN); CreateThrusterGroup (th_att_lin, 2, THGROUP_ATT_UP); CreateThrusterGroup (th_att_lin+2, 2, THGROUP_ATT_DOWN); th_att_rot[0] = th_att_lin[0] = CreateThruster (_V(0,0, 6), _V(-1,0,0), MAXRCSTH, hpr, ISP); th_att_rot[1] = th_att_lin[3] = CreateThruster (_V(0,0,-6), _V( 1,0,0), MAXRCSTH, hpr, ISP); th_att_rot[2] = th_att_lin[2] = CreateThruster (_V(0,0, 6), _V( 1,0,0), MAXRCSTH, hpr, ISP); th_att_rot[3] = th_att_lin[1] = CreateThruster (_V(0,0,-6), _V(-1,0,0), MAXRCSTH, hpr, ISP); CreateThrusterGroup (th_att_rot, 2, THGROUP_ATT_YAWLEFT); CreateThrusterGroup (th_att_rot+2, 2, THGROUP_ATT_YAWRIGHT); CreateThrusterGroup (th_att_lin, 2, THGROUP_ATT_LEFT); CreateThrusterGroup (th_att_lin+2, 2, THGROUP_ATT_RIGHT);
for (int i=0; i<4; i++) SetThrusterResource(th_att_rot[ i ], hpr_new) ;
if (GetPropellantMass(hpr) > 0) savemass = GetPropellantMass(hpr);....SetPropellantMass(hpr,0);
//refill with saved mass valueSetPropellantMass(hpr,savemass);