Skip to content

Map loading is done in 3 different places #1387

@VReaperV

Description

@VReaperV

Engine:
https://github.com/DaemonEngine/Daemon/blob/master/src/engine/renderer/tr_bsp.cpp
Cm:
https://github.com/DaemonEngine/Daemon/blob/master/src/common/cm/cm_load.cpp
Navgen:
https://github.com/Unvanquished/Unvanquished/blob/ec4922cd09c594061d6898e265d1c86cca8220dd/src/shared/navgen/nav.cpp#L211

It's plain bad design, prone to errors, resistant to changes to map loading, and increases the amount of i/o and processing done for no reason whatsoever. There's even a comment in cm_load.cpp saying this code should be deduplicated, but that was never done apparently. The code is largely the same, with a few minor differences where engine uses something but cgame doesn't and vice versa, other than navgen (but I believe that it can use the same loader too).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions