Skip to content

p_floor: EV_DoFloor floor_raiseFloor24 contains dead assignment using offset_from #129

@sunsided

Description

@sunsided

Context

EV_DoFloor in room/src/doom/p_floor.rs, floor_raiseFloor24 arm.

Problem

The arm contains a dead assignment that uses offset_from with the wrong operand type:

(*floor).floordestheight =
    (*floor).sector.offset_from(sec as *mut sector_t) as fixed_t;
(*floor).floordestheight = (*sec).floorheight + 24 * FRACUNIT;

The first line computes a pointer offset (in sector_t strides) and stores it as a fixed_t, which is meaningless. It is immediately overwritten by the second line, so the assignment is harmless but misleading.

Location

room/src/doom/p_floor.rs:449 (flagged with // FIXME:).

Suggested fix

Delete the dead first assignment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions