diff --git a/qw/include/net_svc.h b/qw/include/net_svc.h index 7177f2353..b3b38f51e 100644 --- a/qw/include/net_svc.h +++ b/qw/include/net_svc.h @@ -76,12 +76,14 @@ typedef struct net_svc_modellist_s byte nextmodel; } net_svc_modellist_t; -void NET_SVC_Print_Parse (net_svc_print_t *print, msg_t *message); -void NET_SVC_UpdateUserInfo_Parse (net_svc_updateuserinfo_t *updateuserinfo, - msg_t *message); -void NET_SVC_SetInfo_Parse (net_svc_setinfo_t *setinfo, msg_t *message); -void NET_SVC_Download_Parse (net_svc_download_t *download, msg_t *message); -void NET_SVC_Soundlist_Parse (net_svc_soundlist_t *soundlist, msg_t *message); -void NET_SVC_Modellist_Parse (net_svc_modellist_t *modellist, msg_t *message); +qboolean NET_SVC_Print_Parse (net_svc_print_t *print, msg_t *message); +qboolean NET_SVC_UpdateUserInfo_Parse (net_svc_updateuserinfo_t *updateuserinfo, + msg_t *message); +qboolean NET_SVC_SetInfo_Parse (net_svc_setinfo_t *setinfo, msg_t *message); +qboolean NET_SVC_Download_Parse (net_svc_download_t *download, msg_t *message); +qboolean NET_SVC_Soundlist_Parse (net_svc_soundlist_t *soundlist, + msg_t *message); +qboolean NET_SVC_Modellist_Parse (net_svc_modellist_t *modellist, + msg_t *message); #endif // NET_SVC_H diff --git a/qw/source/net_svc.c b/qw/source/net_svc.c index f9cdab0bf..b417c4f81 100644 --- a/qw/source/net_svc.c +++ b/qw/source/net_svc.c @@ -49,31 +49,37 @@ static const char rcsid[] = #include "compat.h" #include "net_svc.h" -void +qboolean NET_SVC_Print_Parse (net_svc_print_t *print, msg_t *message) { print->level = MSG_ReadByte (message); print->message = MSG_ReadString (message); + + return message->badread; } -void +qboolean NET_SVC_UpdateUserInfo_Parse (net_svc_updateuserinfo_t *updateuserinfo, msg_t *message) { updateuserinfo->slot = MSG_ReadByte (message); updateuserinfo->userid = MSG_ReadLong (message); updateuserinfo->userinfo = MSG_ReadString (message); + + return message->badread; } -void +qboolean NET_SVC_SetInfo_Parse (net_svc_setinfo_t *setinfo, msg_t *message) { setinfo->slot = MSG_ReadByte (message); setinfo->key = MSG_ReadString (message); setinfo->value = MSG_ReadString (message); + + return message->badread; } -void +qboolean NET_SVC_Download_Parse (net_svc_download_t *download, msg_t *message) { download->size = MSG_ReadShort (message); @@ -93,9 +99,11 @@ NET_SVC_Download_Parse (net_svc_download_t *download, msg_t *message) download->size = 0; // FIXME: CL_ParseDownload doesn't handle this } } + + return message->badread; } -void +qboolean NET_SVC_Soundlist_Parse (net_svc_soundlist_t *soundlist, msg_t *message) { int i; @@ -111,9 +119,11 @@ NET_SVC_Soundlist_Parse (net_svc_soundlist_t *soundlist, msg_t *message) soundlist->sounds[MAX_SOUNDS] = ""; soundlist->nextsound = MSG_ReadByte (message); + + return message->badread; } -void +qboolean NET_SVC_Modellist_Parse (net_svc_modellist_t *modellist, msg_t *message) { int i; @@ -129,5 +139,7 @@ NET_SVC_Modellist_Parse (net_svc_modellist_t *modellist, msg_t *message) modellist->models[MAX_MODELS] = ""; modellist->nextmodel = MSG_ReadByte (message); + + return message->badread; }