The Loco (Steam for this case) do have mid wheel, not smooth but with jaw to get fit in the rack @ mid of track..this keep continuous vibration, as the fit isnt smooth & makes hit sound in between!!
This is instrumental for sudden braking while train face steep descend & curves!!
The only one of the Rack & Pinion applicable in India..Kalka-Shimla section covers higher altitude bt isnt as steep as Nilgiri!! Rack & Pinion exist only in between ONR & MTP!!