From 042f310ed78c6588fe88515feb21667d6d15d057 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 6 Feb 2012 15:04:01 +0900 Subject: [PATCH] Add MSG_WriteBytes to match MSG_ReadBytes. --- include/QF/msg.h | 1 + libs/util/msg.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/QF/msg.h b/include/QF/msg.h index 77f60cf42..dd2223b27 100644 --- a/include/QF/msg.h +++ b/include/QF/msg.h @@ -40,6 +40,7 @@ void MSG_WriteShort (sizebuf_t *sb, int c); void MSG_WriteLong (sizebuf_t *sb, int c); void MSG_WriteFloat (sizebuf_t *sb, float f); void MSG_WriteString (sizebuf_t *sb, const char *s); +void MSG_WriteBytes (sizebuf_t *sb, const void *buf, int len); void MSG_WriteCoord (sizebuf_t *sb, float coord); void MSG_WriteCoordV (sizebuf_t *sb, const vec3_t coord); void MSG_WriteCoordAngleV (sizebuf_t *sb, const vec3_t coord, diff --git a/libs/util/msg.c b/libs/util/msg.c index ce773c731..2e620f96f 100644 --- a/libs/util/msg.c +++ b/libs/util/msg.c @@ -106,6 +106,12 @@ MSG_WriteString (sizebuf_t *sb, const char *s) SZ_Write (sb, s, strlen (s) + 1); } +VISIBLE void +MSG_WriteBytes (sizebuf_t *sb, const void *buf, int len) +{ + SZ_Write (sb, buf, len); +} + VISIBLE void MSG_WriteCoord (sizebuf_t *sb, float coord) {