Context
T_MoveCeiling in room/src/doom/p_ceilng.rs is the per-tic ceiling mover.
C behavior
The C original uses a switch(direction) with three branches:
case 0: stasis — no-op
case 1: moving up — calls T_MovePlane, handles pastdest/crushed for upward completion
case -1: moving down — calls T_MovePlane, handles pastdest/crushed for downward completion
The pastdest and crushed reactions are gated on direction so they only fire when moving in the matching direction.
Rust behavior
The Rust port passes direction to T_MovePlane correctly but the match-arm reactions for pastdest/crushed may not be properly gated on the current direction, potentially causing spurious firing when direction == 0 (stasis).
Impact
Ceiling movers in stasis could erroneously trigger sound/state-change logic.
Location
room/src/doom/p_ceilng.rs — T_MoveCeiling
Flagged with // FIXME: in the source.
Context
T_MoveCeilinginroom/src/doom/p_ceilng.rsis the per-tic ceiling mover.C behavior
The C original uses a
switch(direction)with three branches:case 0: stasis — no-opcase 1: moving up — callsT_MovePlane, handlespastdest/crushedfor upward completioncase -1: moving down — callsT_MovePlane, handlespastdest/crushedfor downward completionThe
pastdestandcrushedreactions are gated ondirectionso they only fire when moving in the matching direction.Rust behavior
The Rust port passes
directiontoT_MovePlanecorrectly but the match-arm reactions forpastdest/crushedmay not be properly gated on the current direction, potentially causing spurious firing whendirection == 0(stasis).Impact
Ceiling movers in stasis could erroneously trigger sound/state-change logic.
Location
room/src/doom/p_ceilng.rs—T_MoveCeilingFlagged with
// FIXME:in the source.