ksp: add some control to the C version

This commit is contained in:
Vince Weaver 2016-05-26 15:46:46 -04:00
parent 9ab8b70cd9
commit 8012d2f90b

View File

@ -142,7 +142,7 @@ int main(int argc, char **argv) {
/* 4010 */
fuel_left=fuel_mass[stage]*100.0/stage_fuel_total[stage];
thrusting=1;//autopilot(fuel_left, rocket_altitude,&angle);
//thrusting=1;//autopilot(fuel_left, rocket_altitude,&angle);
if (thrusting) {
if (fuel_mass[stage]<0.1) {
@ -268,6 +268,15 @@ int main(int argc, char **argv) {
angle-=45.0;
if (angle<0.0) angle+=360.0;
}
if (input=='z') {
thrusting=1;
}
if (input=='x') {
thrusting=0;
}
if (input=='q') {
break;
}
time+=1.0;