you can encode the extra ent bits into the flags byte, as there's 3 unused bits there, or just add a flag to separate ent+channel.
Also, make sure you fix signed->unsigned in cl_parsemuzzleflash* too
ultimately, the gamecode decides the max, not the engine.
you might want to make sure that the various places that parse entity numbers parse an unsigned short and not a signed one.
beware of local arrays. if these arrays are too big they can segfault you.
Vanilla NQ protocol has a max of 65536, once its been fixed to use unsigned shorts instead of signed... and muuuch bigger datagrams.
Vanilla QW protocol has a max of 512 due to entity delta encoding, and 2048 due to sound encoding.