aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon/msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'code/qcommon/msg.c')
-rw-r--r--code/qcommon/msg.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/code/qcommon/msg.c b/code/qcommon/msg.c
index b26cf8f..3840a8c 100644
--- a/code/qcommon/msg.c
+++ b/code/qcommon/msg.c
@@ -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;