Where's the code related to block 494784 for segwit2x?
It is referenced relatively, namely by using the parameter BIP102HeightDelta. The hardfork is 3 months after the block that Segwit was actived and the number of blocks after is equal to 90(days)*144(blocks/day)(https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/chainparams.cpp#L78)  

Try to look for that parameter. It will show up that it is used here to define if the 3 months have passed to activate 2MB or not (https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/validation.cpp#L2934 and https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/validation.cpp#L1853 and https://github.com/btc1/bitcoin/blob/385cbc994f35d36cefdab8c1c00ebfaceb55cfc6/src/consensus/consensus.h#L24).