[Fix] ai.brake.

This commit is contained in:
Allanis 2013-08-14 10:50:50 +01:00
parent 4711033ff4
commit d4fe47f184

View File

@ -756,7 +756,7 @@ static int ai_brake(lua_State* L) {
if(d >= 2*M_PI) d = fmodf(d, 2*M_PI); if(d >= 2*M_PI) d = fmodf(d, 2*M_PI);
diff = angle_diff(d, VANGLE(cur_pilot->solid->vel)); diff = angle_diff(d, VANGLE(cur_pilot->solid->vel));
pilot_turn = -10*diff; pilot_turn = 10*diff;
if(ABS(diff) < MAX_DIR_ERR && VMOD(cur_pilot->solid->vel) > MIN_VEL_ERR) if(ABS(diff) < MAX_DIR_ERR && VMOD(cur_pilot->solid->vel) > MIN_VEL_ERR)
pilot_acc = 1.; pilot_acc = 1.;