[Fix] ai.brake.
This commit is contained in:
parent
4711033ff4
commit
d4fe47f184
2
src/ai.c
2
src/ai.c
@ -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.;
|
||||||
|
Loading…
Reference in New Issue
Block a user