0x1F9F1 / Open1560

A mod for Midtown Madness 1, primarily focused on supporting modern computers and fixing bugs.
https://0x1F9F1.github.io/Open1560
GNU General Public License v3.0
110 stars 8 forks source link

Opponent Bus Crashes the Game #152

Open KcRobin9 opened 3 months ago

KcRobin9 commented 3 months ago

In races, e.g. The Littler Loop, an opponent bus cannot be set without also setting an opponent semi. The race will load, but crash after a couple seconds.

It is not clear why adding an opponent semi avoids the crash.

Crash log:

ABORT: Assertion failed (C:\mm\src\mmai\aiVehicleOpponent.c,229): 'm_iIndexNumber != -1'
ERROR: 7731 symbols parsed from map file.
15. 0x0044E327 (aiVehicleOpponent::UpdateAudio + 0x27)
14. 0x59A4A54D (asNode::Update + 0xCD)
13. 0x00436634 (aiMap::Update + 0x344)
12. 0x59A4A54D (asNode::Update + 0xCD)
11. 0x00410488 (mmGame::Update + 0x1E8)
10. 0x0041549F (mmSingleCircuit::Update + 0xF)
9. 0x59A4A54D (asNode::Update + 0xCD)
8. 0x59A4CAEB (asSimulation::Update + 0x52B)
7. 0x59A4C587 (asSimulation::Simulate + 0x77)
6. 0x59A82A28 (GameLoop + 0x1B8)
5. 0x59A80EAC (MainPhase + 0x90C)
4. 0x59A81BE8 (ApplicationHelper + 0x9C8)
3. 0x59A82841 (Application + 0xC1)
2. 0x59A823FB (SDL_main + 0x23B)
1. 0x59A91048 (main_getcmdline + 0xF8)
0. 0x59A90F45 (WinMain + 0x5)

Additional context:

[Opponent]
6
vpbus   opp1c0.c27 
vpcaddie opp2c0.c27 
vpcaddie    opp3c0.c27 
vpcaddie    opp4c0.c27 
vpcaddie    opp5c0.c27 
vpcaddie    opp6c0.c27 

Picture in-game:

Bus_only

And below we are setting a bus and a semi:

[Opponent]
6
vpbus   opp1c0.c27 
vpsemi opp2c0.c27 
vpcaddie    opp3c0.c27 
vpcaddie    opp4c0.c27 
vpcaddie    opp5c0.c27 
vpcaddie    opp6c0.c27 

Picture-ingame:

Bus_and_Semi