garrynewman/garrysmod — pull request #581 by HandsomeMatt (2014-01-28 00:00:22+00:00)
Title: Added net.Read/WritePlayer & adjusted entity bits.

Considering the max entity count is only ~8096, sending 32 bits for it seems a little excessive. So let's use 16 bits instead, that way we get between 0-65534, align to nearest byte for simplicity.
Players are indexed from 0, MaxPlayers so it can't exceed 128, align to the nearest byte gives us 8 bits.
Just a little optimization.