GetOpponentsSectionMaxSpeed matching

This commit is contained in:
Dethrace Labs 2025-10-03 19:24:24 +13:00
parent a67985120a
commit 926dcc74d3
1 changed files with 3 additions and 5 deletions

View File

@ -3052,12 +3052,10 @@ int GetOpponentsSectionMaxSpeed(tOpponent_spec* pOpponent_spec, tS16 pSection, i
if (pSection >= 20000 && pSection - 20000 < pOpponent_spec->nnext_sections) {
section_no = pOpponent_spec->next_sections[pSection - 20000].section_no;
direction = pOpponent_spec->next_sections[pSection - 20000].direction;
return gProgram_state.AI_vehicles.path_sections[section_no].max_speed[pTowards_finish == direction];
}
if (pSection >= 15000) {
return gProgram_state.AI_vehicles.path_sections[section_no].max_speed[(direction ^ pTowards_finish) == 0];
} else if (pSection >= 15000) {
return 255;
}
if (pSection == 10000) {
} else if (pSection == 10000) {
return pOpponent_spec->pursue_car_data.direct_line_section.max_speed[pTowards_finish];
}
dr_dprintf("WARNING - GetOpponentsSectionMaxSpeed() - section not found in next_section array for opponent %s", pOpponent_spec->car_spec->driver_name);