Skip to content

p_setup: P_SetupLevel constructs lump names without DEH_snprintf #137

Description

@sunsided

Context

P_SetupLevel in room/src/doom/p_setup.rs builds the map lump name from the episode and map numbers before loading the level.

C behavior

p_setup.c uses DEH_snprintf for the lump name, so DeHackEd patches can rename map lumps (e.g. remap E1M1 to a custom string).

Rust behavior

The Rust port uses format! and does not apply DeHackEd patches to the lump name.

Impact

Modded WADs that rely on DeHackEd-renamed map lumps will fail to load the intended map.

Location

room/src/doom/p_setup.rs:1229 (flagged with // FIXME:).

Suggested fix

Route the lump-name string through the DeHackEd substitution layer (whichever mechanism replaces DEH_String / DEH_snprintf in this port) before passing it to the WAD lookup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-p_setupArea: p_setupbugSomething isn't workingkilo-auto-fixAuto-generated label by Kilokilo-triagedAuto-generated label by Kilo

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions