Skip to content

p_floor: EV_DoFloor floor_raiseFloorCrush arm missing C fallthrough behavior #124

@sunsided

Description

@sunsided

Context

EV_DoFloor in room/src/doom/p_floor.rs handles floor movement triggered by linedef specials.

C behavior

In the C switch(floortype), case raiseFloorCrush falls through into case raiseFloor, so the floor gets both crush = 1 AND the speed, direction, and destination height set for a normal rising floor.

Rust behavior

The Rust port handles floor_raiseFloorCrush as a separate match arm that only sets crush = 1. Speed, direction, and destination height are NOT initialized, so the floor never actually moves.

Impact

raiseFloorCrush floor specials are effectively broken — they create a floor mover thinker but it never moves.

Location

room/src/doom/p_floor.rsEV_DoFloor, floor_raiseFloorCrush arm

Flagged with // FIXME: in the source.

Suggested fix

After setting crush = 1, fall through into the floor_raiseFloor initialization (set speed, direction, and destination height). This matches the C switch fallthrough.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-p_floorArea: p_floorbugSomething 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