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

[1] mmBridgeSet::Init #143

Open KcRobin9 opened 5 months ago

KcRobin9 commented 5 months ago

The original bridge function causes crashes in custom maps when in multiplayer mode.

This is unfortunate as it forces users to add -noai, which then removes the bridges and has other side effects.

I'm not sure why there were additional checks for multiplayer. Moreover, I wasn't fully sure how to deal with PtlPath.

But for now, the current version compiles and looks to run fine in game.

KcRobin9 commented 2 weeks ago

Game.cpp (lines 803 - 809)

    // TODO: Fix crash in mmBridgeSet::Init when the AI map is missing
    if (!MMSTATE.DisableAI)
    {
        AnimMgr = arnew mmAnimMgr();
        AnimMgr->Init(MapName, Player->Car.Sim.Model, nullptr, 0);
        AddChild(AnimMgr.get());
    }