- speed1_wish = speed_wish_left * (100-aft_handicap)/100.0;
- speed2_wish = speed_wish_left * (100-front_handicap)/100.0;
- speed3_wish = speed_wish_right * (100-front_handicap)/100.0;
- speed4_wish = speed_wish_right * (100-aft_handicap)/100.0;
+ if (speed_wish_left > 0 && aft_handicap_fwd > 0) {
+ speed1_wish = speed_wish_left * (100-aft_handicap_fwd)/100.0;
+ } else {
+ speed1_wish = speed_wish_left;
+ }
+ if (speed_wish_left < 0 && front_handicap_bwd > 0) {
+ speed2_wish = speed_wish_left * (100-front_handicap_bwd)/100.0;
+ } else {
+ speed2_wish = speed_wish_left;
+ }
+ if (speed_wish_right < 0 && front_handicap_bwd > 0) {
+ speed3_wish = speed_wish_right * (100-front_handicap_bwd)/100.0;
+ } else {
+ speed3_wish = speed_wish_right;
+ }
+ if (speed_wish_right > 0 && aft_handicap_fwd > 0) {
+ speed4_wish = speed_wish_right * (100-aft_handicap_fwd)/100.0;
+ } else {
+ speed4_wish = speed_wish_right;
+ }