Changed the protocol for VoIP packets to support legacy clients.

Previously, a legacy client wouldn't get a VoIP packet, but if they did,
 they'd panic and disconnect. Now they ignore them and continue on. This also
 gives us the framework to add other features legacy clients can ignore.

Oh, this also has the benefit of allowing us to store incoming VoIP for
 playback in recorded demos. They'll play the chatter on VoIP clients, and
 be ignored on legacy ones. Huge win.
This commit is contained in:
Ryan C. Gordon 2008-06-03 02:32:52 +00:00
parent e0ebde0b27
commit 8ab3f7af8d
6 changed files with 79 additions and 16 deletions

View file

@ -389,6 +389,17 @@ int MSG_ReadByte( msg_t *msg ) {
return c;
}
int MSG_LookaheadByte( msg_t *msg ) {
const int bloc = Huff_getBloc();
const int readcount = msg->readcount;
const int bit = msg->bit;
int c = MSG_ReadByte(msg);
Huff_setBloc(bloc);
msg->readcount = readcount;
msg->bit = bit;
return c;
}
int MSG_ReadShort( msg_t *msg ) {
int c;