Context
T_MoveCeiling in room/src/doom/p_ceilng.rs handles ceiling crushers.
C behavior
In the C switch(direction) case -1 (moving down) branch, the silentCrushAndRaise type:
- Plays the pstop sound
- Falls through to the
crushAndRaise/fastCrushAndRaise handling, which:
- Restores
speed = CEILSPEED
- Reverses direction to
1 (up)
This fallthrough is a C switch design pattern — the case for silentCrushAndRaise intentionally shares code with the crusher cases.
Rust behavior
The Rust port handles silentCrushAndRaise as a separate match arm that plays the sound but does NOT restore speed or reverse direction, diverging from the C fallthrough behavior.
Impact
Silent crusher ceilings may not correctly reverse after hitting the floor, potentially getting stuck or continuing to move down indefinitely.
Location
room/src/doom/p_ceilng.rs — T_MoveCeiling
Flagged with // FIXME: in the source.
Suggested fix
After playing the pstop sound for silentCrushAndRaise, add the same speed-restore and direction-reversal logic present in the crushAndRaise/fastCrushAndRaise arms.
Context
T_MoveCeilinginroom/src/doom/p_ceilng.rshandles ceiling crushers.C behavior
In the C
switch(direction)case -1(moving down) branch, thesilentCrushAndRaisetype:crushAndRaise/fastCrushAndRaisehandling, which:speed = CEILSPEED1(up)This fallthrough is a C
switchdesign pattern — the case forsilentCrushAndRaiseintentionally shares code with the crusher cases.Rust behavior
The Rust port handles
silentCrushAndRaiseas a separate match arm that plays the sound but does NOT restore speed or reverse direction, diverging from the C fallthrough behavior.Impact
Silent crusher ceilings may not correctly reverse after hitting the floor, potentially getting stuck or continuing to move down indefinitely.
Location
room/src/doom/p_ceilng.rs—T_MoveCeilingFlagged with
// FIXME:in the source.Suggested fix
After playing the pstop sound for
silentCrushAndRaise, add the same speed-restore and direction-reversal logic present in thecrushAndRaise/fastCrushAndRaisearms.