]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.c
added Q1 BSP2 format support, compatible with hmap2
[xonotic/darkplaces.git] / common.c
index ca153b151e650d2e42319651553501eb7092dcd0..3b986194ad7720612a9eeb5b04b91d112f47db9b 100644 (file)
--- a/common.c
+++ b/common.c
@@ -405,6 +405,14 @@ void MSG_WriteAngle (sizebuf_t *sb, float f, protocolversion_t protocol)
 // reading functions
 //
 
+void MSG_InitReadBuffer (sizebuf_t *buf, unsigned char *data, int size)
+{
+       memset(buf, 0, sizeof(*buf));
+       buf->data = data;
+       buf->maxsize = buf->cursize = size;
+       MSG_BeginReading(buf);
+}
+
 void MSG_BeginReading(sizebuf_t *sb)
 {
        sb->readcount = 0;