diff --git a/include/QF/msg.h b/include/QF/msg.h index ed5aca8f5..1bc362d38 100644 --- a/include/QF/msg.h +++ b/include/QF/msg.h @@ -49,21 +49,21 @@ typedef struct msg_s { sizebuf_t *message; size_t badread_string_size; char *badread_string; -} msg_t; +} qmsg_t; -void MSG_BeginReading (msg_t *msg); -int MSG_GetReadCount(msg_t *msg); -int MSG_ReadByte (msg_t *msg); -int MSG_ReadShort (msg_t *msg); -int MSG_ReadLong (msg_t *msg); -float MSG_ReadFloat (msg_t *msg); -const char *MSG_ReadString (msg_t *msg); +void MSG_BeginReading (qmsg_t *msg); +int MSG_GetReadCount(qmsg_t *msg); +int MSG_ReadByte (qmsg_t *msg); +int MSG_ReadShort (qmsg_t *msg); +int MSG_ReadLong (qmsg_t *msg); +float MSG_ReadFloat (qmsg_t *msg); +const char *MSG_ReadString (qmsg_t *msg); -float MSG_ReadCoord (msg_t *msg); -void MSG_ReadCoordV (msg_t *msg, vec3_t coord); -float MSG_ReadAngle (msg_t *msg); -void MSG_ReadCoordAngleV (msg_t *msg, vec3_t coord, vec3_t angles); -void MSG_ReadAngleV (msg_t *msg, vec3_t angles); -float MSG_ReadAngle16 (msg_t *msg); +float MSG_ReadCoord (qmsg_t *msg); +void MSG_ReadCoordV (qmsg_t *msg, vec3_t coord); +float MSG_ReadAngle (qmsg_t *msg); +void MSG_ReadCoordAngleV (qmsg_t *msg, vec3_t coord, vec3_t angles); +void MSG_ReadAngleV (qmsg_t *msg, vec3_t angles); +float MSG_ReadAngle16 (qmsg_t *msg); #endif diff --git a/libs/net/nc/net_udp.c b/libs/net/nc/net_udp.c index 999c514d0..ded58a95b 100644 --- a/libs/net/nc/net_udp.c +++ b/libs/net/nc/net_udp.c @@ -101,8 +101,8 @@ netadr_t net_local_adr; netadr_t net_from; static sizebuf_t _net_message_message; -static msg_t _net_message = {0, 0, &_net_message_message}; -msg_t *net_message = &_net_message; +static qmsg_t _net_message = {0, 0, &_net_message_message}; +qmsg_t *net_message = &_net_message; #define MAX_UDP_PACKET (MAX_MSGLEN*2) byte net_message_buffer[MAX_UDP_PACKET]; diff --git a/libs/net/nc/net_udp6.c b/libs/net/nc/net_udp6.c index 5f835ab02..cbdc9a1a2 100644 --- a/libs/net/nc/net_udp6.c +++ b/libs/net/nc/net_udp6.c @@ -126,8 +126,8 @@ netadr_t net_local_adr; int net_socket; static sizebuf_t _net_message_message; -static msg_t _net_message = {0, 0, &_net_message_message}; -msg_t *net_message = &_net_message; +static qmsg_t _net_message = {0, 0, &_net_message_message}; +qmsg_t *net_message = &_net_message; #define MAX_UDP_PACKET (MAX_MSGLEN*2) byte net_message_buffer[MAX_UDP_PACKET]; diff --git a/libs/net/net_main.c b/libs/net/net_main.c index 66616a1ed..a6f5d4199 100644 --- a/libs/net/net_main.c +++ b/libs/net/net_main.c @@ -92,8 +92,8 @@ PollProcedure slistPollProcedure = { NULL, 0.0, Slist_Poll }; static sizebuf_t _net_message_message; -static msg_t _net_message = { 0, 0, &_net_message_message }; -msg_t *net_message = &_net_message; +static qmsg_t _net_message = { 0, 0, &_net_message_message }; +qmsg_t *net_message = &_net_message; int net_activeconnections = 0; int messagesSent = 0; diff --git a/libs/util/msg.c b/libs/util/msg.c index 566d6e38a..2c2d4889b 100644 --- a/libs/util/msg.c +++ b/libs/util/msg.c @@ -168,20 +168,20 @@ MSG_WriteAngle16 (sizebuf_t *sb, float angle16) // reading functions ========================================================== void -MSG_BeginReading (msg_t *msg) +MSG_BeginReading (qmsg_t *msg) { msg->readcount = 0; msg->badread = false; } int -MSG_GetReadCount (msg_t *msg) +MSG_GetReadCount (qmsg_t *msg) { return msg->readcount; } int -MSG_ReadByte (msg_t *msg) +MSG_ReadByte (qmsg_t *msg) { if (msg->readcount + 1 <= msg->message->cursize) return (unsigned char) msg->message->data[msg->readcount++]; @@ -191,7 +191,7 @@ MSG_ReadByte (msg_t *msg) } int -MSG_ReadShort (msg_t *msg) +MSG_ReadShort (qmsg_t *msg) { int c; @@ -207,7 +207,7 @@ MSG_ReadShort (msg_t *msg) } int -MSG_ReadLong (msg_t *msg) +MSG_ReadLong (qmsg_t *msg) { int c; @@ -225,7 +225,7 @@ MSG_ReadLong (msg_t *msg) } float -MSG_ReadFloat (msg_t *msg) +MSG_ReadFloat (qmsg_t *msg) { union { byte b[4]; @@ -251,7 +251,7 @@ MSG_ReadFloat (msg_t *msg) } const char * -MSG_ReadString (msg_t *msg) +MSG_ReadString (qmsg_t *msg) { char *string; size_t len, maxlen; @@ -286,13 +286,13 @@ MSG_ReadString (msg_t *msg) } float -MSG_ReadCoord (msg_t *msg) +MSG_ReadCoord (qmsg_t *msg) { return MSG_ReadShort (msg) * (1.0 / 8.0); } void -MSG_ReadCoordV (msg_t *msg, vec3_t coord) +MSG_ReadCoordV (qmsg_t *msg, vec3_t coord) { int i; @@ -301,7 +301,7 @@ MSG_ReadCoordV (msg_t *msg, vec3_t coord) } void -MSG_ReadCoordAngleV (msg_t *msg, vec3_t coord, vec3_t angles) +MSG_ReadCoordAngleV (qmsg_t *msg, vec3_t coord, vec3_t angles) { int i; @@ -312,13 +312,13 @@ MSG_ReadCoordAngleV (msg_t *msg, vec3_t coord, vec3_t angles) } float -MSG_ReadAngle (msg_t *msg) +MSG_ReadAngle (qmsg_t *msg) { return ((signed char) MSG_ReadByte (msg)) * (360.0 / 256.0); } void -MSG_ReadAngleV (msg_t *msg, vec3_t angles) +MSG_ReadAngleV (qmsg_t *msg, vec3_t angles) { int i; @@ -327,7 +327,7 @@ MSG_ReadAngleV (msg_t *msg, vec3_t angles) } float -MSG_ReadAngle16 (msg_t *msg) +MSG_ReadAngle16 (qmsg_t *msg) { return MSG_ReadShort (msg) * (360.0 / 65536.0); } diff --git a/qw/include/net_svc.h b/qw/include/net_svc.h index 969226bf0..700d18dd7 100644 --- a/qw/include/net_svc.h +++ b/qw/include/net_svc.h @@ -334,136 +334,136 @@ typedef struct net_svc_setpause_s const char *NET_SVC_GetString (int type); net_status_t NET_SVC_NOP_Emit (net_svc_nop_t *block, sizebuf_t *buf); -net_status_t NET_SVC_NOP_Parse (net_svc_nop_t *block, msg_t *msg); +net_status_t NET_SVC_NOP_Parse (net_svc_nop_t *block, qmsg_t *msg); net_status_t NET_SVC_Disconnect_Emit (net_svc_disconnect_t *block, sizebuf_t *buf); -net_status_t NET_SVC_Disconnect_Parse (net_svc_disconnect_t *block, msg_t *msg); +net_status_t NET_SVC_Disconnect_Parse (net_svc_disconnect_t *block, qmsg_t *msg); net_status_t NET_SVC_Print_Emit (net_svc_print_t *block, sizebuf_t *buf); -net_status_t NET_SVC_Print_Parse (net_svc_print_t *block, msg_t *msg); +net_status_t NET_SVC_Print_Parse (net_svc_print_t *block, qmsg_t *msg); net_status_t NET_SVC_Centerprint_Emit (net_svc_centerprint_t *block, sizebuf_t *buf); net_status_t NET_SVC_Centerprint_Parse (net_svc_centerprint_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_Stufftext_Emit (net_svc_stufftext_t *block, sizebuf_t *buf); -net_status_t NET_SVC_Stufftext_Parse (net_svc_stufftext_t *block, msg_t *msg); +net_status_t NET_SVC_Stufftext_Parse (net_svc_stufftext_t *block, qmsg_t *msg); net_status_t NET_SVC_Damage_Emit (net_svc_damage_t *block, sizebuf_t *buf); -net_status_t NET_SVC_Damage_Parse (net_svc_damage_t *block, msg_t *msg); +net_status_t NET_SVC_Damage_Parse (net_svc_damage_t *block, qmsg_t *msg); net_status_t NET_SVC_ServerData_Emit (net_svc_serverdata_t *block, sizebuf_t *buf); -net_status_t NET_SVC_ServerData_Parse (net_svc_serverdata_t *block, msg_t *msg); +net_status_t NET_SVC_ServerData_Parse (net_svc_serverdata_t *block, qmsg_t *msg); net_status_t NET_SVC_SetAngle_Emit (net_svc_setangle_t *block, sizebuf_t *buf); -net_status_t NET_SVC_SetAngle_Parse (net_svc_setangle_t *block, msg_t *msg); +net_status_t NET_SVC_SetAngle_Parse (net_svc_setangle_t *block, qmsg_t *msg); net_status_t NET_SVC_LightStyle_Emit (net_svc_lightstyle_t *block, sizebuf_t *buf); -net_status_t NET_SVC_LightStyle_Parse (net_svc_lightstyle_t *block, msg_t *msg); +net_status_t NET_SVC_LightStyle_Parse (net_svc_lightstyle_t *block, qmsg_t *msg); net_status_t NET_SVC_Sound_Emit (net_svc_sound_t *block, sizebuf_t *buf); -net_status_t NET_SVC_Sound_Parse (net_svc_sound_t *block, msg_t *msg); +net_status_t NET_SVC_Sound_Parse (net_svc_sound_t *block, qmsg_t *msg); net_status_t NET_SVC_StopSound_Emit (net_svc_stopsound_t *block, sizebuf_t *buf); -net_status_t NET_SVC_StopSound_Parse (net_svc_stopsound_t *block, msg_t *msg); +net_status_t NET_SVC_StopSound_Parse (net_svc_stopsound_t *block, qmsg_t *msg); net_status_t NET_SVC_UpdateFrags_Emit (net_svc_updatefrags_t *block, sizebuf_t *buf); net_status_t NET_SVC_UpdateFrags_Parse (net_svc_updatefrags_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_UpdatePing_Emit (net_svc_updateping_t *block, sizebuf_t *buf); -net_status_t NET_SVC_UpdatePing_Parse (net_svc_updateping_t *block, msg_t *msg); +net_status_t NET_SVC_UpdatePing_Parse (net_svc_updateping_t *block, qmsg_t *msg); net_status_t NET_SVC_UpdatePL_Emit (net_svc_updatepl_t *block, sizebuf_t *buf); -net_status_t NET_SVC_UpdatePL_Parse (net_svc_updatepl_t *block, msg_t *msg); +net_status_t NET_SVC_UpdatePL_Parse (net_svc_updatepl_t *block, qmsg_t *msg); net_status_t NET_SVC_UpdateEnterTime_Emit (net_svc_updateentertime_t *block, sizebuf_t *buf); net_status_t NET_SVC_UpdateEnterTime_Parse (net_svc_updateentertime_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_SpawnBaseline_Emit (net_svc_spawnbaseline_t *block, sizebuf_t *buf); net_status_t NET_SVC_SpawnBaseline_Parse (net_svc_spawnbaseline_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_SpawnStatic_Emit (net_svc_spawnstatic_t *block, sizebuf_t *buf); net_status_t NET_SVC_SpawnStatic_Parse (net_svc_spawnstatic_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_TempEntity_Emit (net_svc_tempentity_t *block, sizebuf_t *buf); -net_status_t NET_SVC_TempEntity_Parse (net_svc_tempentity_t *block, msg_t *msg); +net_status_t NET_SVC_TempEntity_Parse (net_svc_tempentity_t *block, qmsg_t *msg); net_status_t NET_SVC_KilledMonster_Emit (net_svc_killedmonster_t *block, sizebuf_t *buf); net_status_t NET_SVC_KilledMonster_Parse (net_svc_killedmonster_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_FoundSecret_Emit (net_svc_foundsecret_t *block, sizebuf_t *buf); net_status_t NET_SVC_FoundSecret_Parse (net_svc_foundsecret_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_SpawnStaticSound_Emit (net_svc_spawnstaticsound_t *block, sizebuf_t *buf); net_status_t NET_SVC_SpawnStaticSound_Parse (net_svc_spawnstaticsound_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_UpdateStat_Emit (net_svc_updatestat_t *block, sizebuf_t *buf); -net_status_t NET_SVC_UpdateStat_Parse (net_svc_updatestat_t *block, msg_t *msg); +net_status_t NET_SVC_UpdateStat_Parse (net_svc_updatestat_t *block, qmsg_t *msg); net_status_t NET_SVC_UpdateStatLong_Emit (net_svc_updatestatlong_t *block, sizebuf_t *buf); net_status_t NET_SVC_UpdateStatLong_Parse (net_svc_updatestatlong_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_CDTrack_Emit (net_svc_cdtrack_t *block, sizebuf_t *buf); -net_status_t NET_SVC_CDTrack_Parse (net_svc_cdtrack_t *block, msg_t *msg); +net_status_t NET_SVC_CDTrack_Parse (net_svc_cdtrack_t *block, qmsg_t *msg); net_status_t NET_SVC_Intermission_Emit (net_svc_intermission_t *block, sizebuf_t *buf); net_status_t NET_SVC_Intermission_Parse (net_svc_intermission_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_Finale_Emit (net_svc_finale_t *block, sizebuf_t *buf); -net_status_t NET_SVC_Finale_Parse (net_svc_finale_t *block, msg_t *msg); +net_status_t NET_SVC_Finale_Parse (net_svc_finale_t *block, qmsg_t *msg); net_status_t NET_SVC_SellScreen_Emit (net_svc_sellscreen_t *block, sizebuf_t *buf); -net_status_t NET_SVC_SellScreen_Parse (net_svc_sellscreen_t *block, msg_t *msg); +net_status_t NET_SVC_SellScreen_Parse (net_svc_sellscreen_t *block, qmsg_t *msg); net_status_t NET_SVC_SmallKick_Emit (net_svc_smallkick_t *block, sizebuf_t *buf); -net_status_t NET_SVC_SmallKick_Parse (net_svc_smallkick_t *block, msg_t *msg); +net_status_t NET_SVC_SmallKick_Parse (net_svc_smallkick_t *block, qmsg_t *msg); net_status_t NET_SVC_BigKick_Emit (net_svc_bigkick_t *block, sizebuf_t *buf); -net_status_t NET_SVC_BigKick_Parse (net_svc_bigkick_t *block, msg_t *msg); +net_status_t NET_SVC_BigKick_Parse (net_svc_bigkick_t *block, qmsg_t *msg); net_status_t NET_SVC_MuzzleFlash_Emit (net_svc_muzzleflash_t *block, sizebuf_t *buf); net_status_t NET_SVC_MuzzleFlash_Parse (net_svc_muzzleflash_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_UpdateUserInfo_Emit (net_svc_updateuserinfo_t *block, sizebuf_t *buf); net_status_t NET_SVC_UpdateUserInfo_Parse (net_svc_updateuserinfo_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_SetInfo_Emit (net_svc_setinfo_t *block, sizebuf_t *buf); -net_status_t NET_SVC_SetInfo_Parse (net_svc_setinfo_t *block, msg_t *msg); +net_status_t NET_SVC_SetInfo_Parse (net_svc_setinfo_t *block, qmsg_t *msg); net_status_t NET_SVC_ServerInfo_Emit (net_svc_serverinfo_t *block, sizebuf_t *buf); -net_status_t NET_SVC_ServerInfo_Parse (net_svc_serverinfo_t *block, msg_t *msg); +net_status_t NET_SVC_ServerInfo_Parse (net_svc_serverinfo_t *block, qmsg_t *msg); net_status_t NET_SVC_Download_Emit (net_svc_download_t *block, sizebuf_t *buf); -net_status_t NET_SVC_Download_Parse (net_svc_download_t *block, msg_t *msg); +net_status_t NET_SVC_Download_Parse (net_svc_download_t *block, qmsg_t *msg); net_status_t NET_SVC_Playerinfo_Emit (net_svc_playerinfo_t *block, sizebuf_t *buf); -net_status_t NET_SVC_Playerinfo_Parse (net_svc_playerinfo_t *block, msg_t *msg); +net_status_t NET_SVC_Playerinfo_Parse (net_svc_playerinfo_t *block, qmsg_t *msg); net_status_t NET_SVC_Nails_Emit (net_svc_nails_t *block, sizebuf_t *buf); -net_status_t NET_SVC_Nails_Parse (net_svc_nails_t *block, msg_t *msg); +net_status_t NET_SVC_Nails_Parse (net_svc_nails_t *block, qmsg_t *msg); net_status_t NET_SVC_ChokeCount_Emit (net_svc_chokecount_t *block, sizebuf_t *buf); -net_status_t NET_SVC_ChokeCount_Parse (net_svc_chokecount_t *block, msg_t *msg); +net_status_t NET_SVC_ChokeCount_Parse (net_svc_chokecount_t *block, qmsg_t *msg); net_status_t NET_SVC_Modellist_Emit (net_svc_modellist_t *block, sizebuf_t *buf); -net_status_t NET_SVC_Modellist_Parse (net_svc_modellist_t *block, msg_t *msg); +net_status_t NET_SVC_Modellist_Parse (net_svc_modellist_t *block, qmsg_t *msg); net_status_t NET_SVC_Soundlist_Emit (net_svc_soundlist_t *block, sizebuf_t *buf); -net_status_t NET_SVC_Soundlist_Parse (net_svc_soundlist_t *block, msg_t *msg); +net_status_t NET_SVC_Soundlist_Parse (net_svc_soundlist_t *block, qmsg_t *msg); net_status_t NET_SVC_PacketEntities_Emit (net_svc_packetentities_t *block, sizebuf_t *buf); net_status_t NET_SVC_PacketEntities_Parse (net_svc_packetentities_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_DeltaPacketEntities_Emit (net_svc_deltapacketentities_t *block, sizebuf_t *buf); net_status_t NET_SVC_DeltaPacketEntities_Parse (net_svc_deltapacketentities_t *block, - msg_t *msg); + qmsg_t *msg); net_status_t NET_SVC_MaxSpeed_Emit (net_svc_maxspeed_t *block, sizebuf_t *buf); -net_status_t NET_SVC_MaxSpeed_Parse (net_svc_maxspeed_t *block, msg_t *msg); +net_status_t NET_SVC_MaxSpeed_Parse (net_svc_maxspeed_t *block, qmsg_t *msg); net_status_t NET_SVC_EntGravity_Emit (net_svc_entgravity_t *block, sizebuf_t *buf); -net_status_t NET_SVC_EntGravity_Parse (net_svc_entgravity_t *block, msg_t *msg); +net_status_t NET_SVC_EntGravity_Parse (net_svc_entgravity_t *block, qmsg_t *msg); net_status_t NET_SVC_SetPause_Emit (net_svc_setpause_t *block, sizebuf_t *buf); -net_status_t NET_SVC_SetPause_Parse (net_svc_setpause_t *block, msg_t *msg); +net_status_t NET_SVC_SetPause_Parse (net_svc_setpause_t *block, qmsg_t *msg); #endif // NET_SVC_H diff --git a/qw/source/net_packetlog.c b/qw/source/net_packetlog.c index e108a423b..bee1b6ede 100644 --- a/qw/source/net_packetlog.c +++ b/qw/source/net_packetlog.c @@ -166,7 +166,7 @@ static QFile *_stdout; static QFile *Net_PacketLog; static const char **Net_sound_precache; static sizebuf_t _packet; -static msg_t packet = {0, 0, &_packet}; +static qmsg_t packet = {0, 0, &_packet}; static void Net_LogPrintf (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); diff --git a/qw/source/net_svc.c b/qw/source/net_svc.c index 45652b3a6..548efdba6 100644 --- a/qw/source/net_svc.c +++ b/qw/source/net_svc.c @@ -130,7 +130,7 @@ NET_SVC_NOP_Emit (net_svc_nop_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_NOP_Parse (net_svc_nop_t *block, msg_t *msg) +NET_SVC_NOP_Parse (net_svc_nop_t *block, qmsg_t *msg) { return msg->badread; } @@ -142,7 +142,7 @@ NET_SVC_Disconnect_Emit (net_svc_disconnect_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Disconnect_Parse (net_svc_disconnect_t *block, msg_t *msg) +NET_SVC_Disconnect_Parse (net_svc_disconnect_t *block, qmsg_t *msg) { return msg->badread; } @@ -157,7 +157,7 @@ NET_SVC_Print_Emit (net_svc_print_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Print_Parse (net_svc_print_t *block, msg_t *msg) +NET_SVC_Print_Parse (net_svc_print_t *block, qmsg_t *msg) { block->level = MSG_ReadByte (msg); block->message = MSG_ReadString (msg); @@ -174,7 +174,7 @@ NET_SVC_Centerprint_Emit (net_svc_centerprint_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Centerprint_Parse (net_svc_centerprint_t *block, msg_t *msg) +NET_SVC_Centerprint_Parse (net_svc_centerprint_t *block, qmsg_t *msg) { block->message = MSG_ReadString (msg); @@ -190,7 +190,7 @@ NET_SVC_Stufftext_Emit (net_svc_stufftext_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Stufftext_Parse (net_svc_stufftext_t *block, msg_t *msg) +NET_SVC_Stufftext_Parse (net_svc_stufftext_t *block, qmsg_t *msg) { block->commands = MSG_ReadString (msg); @@ -208,7 +208,7 @@ NET_SVC_Damage_Emit (net_svc_damage_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Damage_Parse (net_svc_damage_t *block, msg_t *msg) +NET_SVC_Damage_Parse (net_svc_damage_t *block, qmsg_t *msg) { int i; @@ -243,7 +243,7 @@ NET_SVC_ServerData_Emit (net_svc_serverdata_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_ServerData_Parse (net_svc_serverdata_t *block, msg_t *msg) +NET_SVC_ServerData_Parse (net_svc_serverdata_t *block, qmsg_t *msg) { block->protocolversion = MSG_ReadLong (msg); // I could abort now if the version is wrong, but why bother? @@ -279,7 +279,7 @@ NET_SVC_SetAngle_Emit (net_svc_setangle_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_SetAngle_Parse (net_svc_setangle_t *block, msg_t *msg) +NET_SVC_SetAngle_Parse (net_svc_setangle_t *block, qmsg_t *msg) { block->angles = MSG_ReadAngleV (msg); @@ -296,7 +296,7 @@ NET_SVC_LightStyle_Emit (net_svc_lightstyle_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_LightStyle_Parse (net_svc_lightstyle_t *block, msg_t *msg) +NET_SVC_LightStyle_Parse (net_svc_lightstyle_t *block, qmsg_t *msg) { block->stylenum = MSG_ReadByte (msg); block->map = MSG_ReadString (msg); @@ -329,7 +329,7 @@ NET_SVC_Sound_Emit (net_svc_sound_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Sound_Parse (net_svc_sound_t *block, msg_t *msg) +NET_SVC_Sound_Parse (net_svc_sound_t *block, qmsg_t *msg) { int i, header; @@ -364,7 +364,7 @@ NET_SVC_StopSound_Emit (net_svc_stopsound_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_StopSound_Parse (net_svc_stopsound_t *block, msg_t *msg) +NET_SVC_StopSound_Parse (net_svc_stopsound_t *block, qmsg_t *msg) { int i = MSG_ReadShort (msg); block->entity = i >> 3; @@ -383,7 +383,7 @@ NET_SVC_UpdateFrags_Emit (net_svc_updatefrags_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_UpdateFrags_Parse (net_svc_updatefrags_t *block, msg_t *msg) +NET_SVC_UpdateFrags_Parse (net_svc_updatefrags_t *block, qmsg_t *msg) { block->player = MSG_ReadByte (msg); block->frags = MSG_ReadShort (msg); @@ -401,7 +401,7 @@ NET_SVC_UpdatePing_Emit (net_svc_updateping_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_UpdatePing_Parse (net_svc_updateping_t *block, msg_t *msg) +NET_SVC_UpdatePing_Parse (net_svc_updateping_t *block, qmsg_t *msg) { block->player = MSG_ReadByte (msg); block->ping = MSG_ReadShort (msg); @@ -419,7 +419,7 @@ NET_SVC_UpdatePL_Emit (net_svc_updatepl_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_UpdatePL_Parse (net_svc_updatepl_t *block, msg_t *msg) +NET_SVC_UpdatePL_Parse (net_svc_updatepl_t *block, qmsg_t *msg) { block->player = MSG_ReadByte (msg); block->packetloss = MSG_ReadByte (msg); @@ -437,7 +437,7 @@ NET_SVC_UpdateEnterTime_Emit (net_svc_updateentertime_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_UpdateEnterTime_Parse (net_svc_updateentertime_t *block, msg_t *msg) +NET_SVC_UpdateEnterTime_Parse (net_svc_updateentertime_t *block, qmsg_t *msg) { block->player = MSG_ReadByte (msg); block->secondsago = MSG_ReadFloat (msg); @@ -462,7 +462,7 @@ NET_SVC_SpawnBaseline_Emit (net_svc_spawnbaseline_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_SpawnBaseline_Parse (net_svc_spawnbaseline_t *block, msg_t *msg) +NET_SVC_SpawnBaseline_Parse (net_svc_spawnbaseline_t *block, qmsg_t *msg) { block->num = MSG_ReadShort (msg); block->modelindex = MSG_ReadByte (msg); @@ -490,7 +490,7 @@ NET_SVC_SpawnStatic_Emit (net_svc_spawnstatic_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_SpawnStatic_Parse (net_svc_spawnstatic_t *block, msg_t *msg) +NET_SVC_SpawnStatic_Parse (net_svc_spawnstatic_t *block, qmsg_t *msg) { int i; @@ -549,7 +549,7 @@ NET_SVC_TempEntity_Emit (net_svc_tempentity_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_TempEntity_Parse (net_svc_tempentity_t *block, msg_t *msg) +NET_SVC_TempEntity_Parse (net_svc_tempentity_t *block, qmsg_t *msg) { int i; @@ -598,7 +598,7 @@ NET_SVC_KilledMonster_Emit (net_svc_killedmonster_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_KilledMonster_Parse (net_svc_killedmonster_t *block, msg_t *msg) +NET_SVC_KilledMonster_Parse (net_svc_killedmonster_t *block, qmsg_t *msg) { return msg->badread; } @@ -610,7 +610,7 @@ NET_SVC_FoundSecret_Emit (net_svc_foundsecret_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_FoundSecret_Parse (net_svc_foundsecret_t *block, msg_t *msg) +NET_SVC_FoundSecret_Parse (net_svc_foundsecret_t *block, qmsg_t *msg) { return msg->badread; } @@ -629,7 +629,7 @@ NET_SVC_SpawnStaticSound_Emit (net_svc_spawnstaticsound_t *block, net_status_t NET_SVC_SpawnStaticSound_Parse (net_svc_spawnstaticsound_t *block, - msg_t *msg) + qmsg_t *msg) { MSG_ReadCoordV (msg, block->position); block->sound_num = MSG_ReadByte (msg); @@ -649,7 +649,7 @@ NET_SVC_UpdateStat_Emit (net_svc_updatestat_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_UpdateStat_Parse (net_svc_updatestat_t *block, msg_t *msg) +NET_SVC_UpdateStat_Parse (net_svc_updatestat_t *block, qmsg_t *msg) { block->stat = MSG_ReadByte (msg); block->value = MSG_ReadByte (msg); @@ -667,7 +667,7 @@ NET_SVC_UpdateStatLong_Emit (net_svc_updatestatlong_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_UpdateStatLong_Parse (net_svc_updatestatlong_t *block, msg_t *msg) +NET_SVC_UpdateStatLong_Parse (net_svc_updatestatlong_t *block, qmsg_t *msg) { block->stat = MSG_ReadByte (msg); block->value = MSG_ReadLong (msg); @@ -684,7 +684,7 @@ NET_SVC_CDTrack_Emit (net_svc_cdtrack_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_CDTrack_Parse (net_svc_cdtrack_t *block, msg_t *msg) +NET_SVC_CDTrack_Parse (net_svc_cdtrack_t *block, qmsg_t *msg) { block->cdtrack = MSG_ReadByte (msg); @@ -701,7 +701,7 @@ NET_SVC_Intermission_Emit (net_svc_intermission_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Intermission_Parse (net_svc_intermission_t *block, msg_t *msg) +NET_SVC_Intermission_Parse (net_svc_intermission_t *block, qmsg_t *msg) { MSG_ReadCoordV (msg, block->origin); MSG_ReadAngleV (msg, block->angles); @@ -718,7 +718,7 @@ NET_SVC_Finale_Emit (net_svc_finale_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Finale_Parse (net_svc_finale_t *block, msg_t *msg) +NET_SVC_Finale_Parse (net_svc_finale_t *block, qmsg_t *msg) { block->message = MSG_ReadString (msg); @@ -732,7 +732,7 @@ NET_SVC_SellScreen_Emit (net_svc_sellscreen_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_SellScreen_Parse (net_svc_sellscreen_t *block, msg_t *msg) +NET_SVC_SellScreen_Parse (net_svc_sellscreen_t *block, qmsg_t *msg) { return msg->badread; } @@ -744,7 +744,7 @@ NET_SVC_SmallKick_Emit (net_svc_smallkick_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_SmallKick_Parse (net_svc_smallkick_t *block, msg_t *msg) +NET_SVC_SmallKick_Parse (net_svc_smallkick_t *block, qmsg_t *msg) { return msg->badread; } @@ -756,7 +756,7 @@ NET_SVC_BigKick_Emit (net_svc_bigkick_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_BigKick_Parse (net_svc_bigkick_t *block, msg_t *msg) +NET_SVC_BigKick_Parse (net_svc_bigkick_t *block, qmsg_t *msg) { return msg->badread; } @@ -770,7 +770,7 @@ NET_SVC_MuzzleFlash_Emit (net_svc_muzzleflash_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_MuzzleFlash_Parse (net_svc_muzzleflash_t *block, msg_t *msg) +NET_SVC_MuzzleFlash_Parse (net_svc_muzzleflash_t *block, qmsg_t *msg) { block->player = MSG_ReadShort (msg); @@ -788,7 +788,7 @@ NET_SVC_UpdateUserInfo_Emit (net_svc_updateuserinfo_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_UpdateUserInfo_Parse (net_svc_updateuserinfo_t *block, msg_t *msg) +NET_SVC_UpdateUserInfo_Parse (net_svc_updateuserinfo_t *block, qmsg_t *msg) { block->slot = MSG_ReadByte (msg); block->userid = MSG_ReadLong (msg); @@ -808,7 +808,7 @@ NET_SVC_SetInfo_Emit (net_svc_setinfo_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_SetInfo_Parse (net_svc_setinfo_t *block, msg_t *msg) +NET_SVC_SetInfo_Parse (net_svc_setinfo_t *block, qmsg_t *msg) { block->slot = MSG_ReadByte (msg); block->key = MSG_ReadString (msg); @@ -827,7 +827,7 @@ NET_SVC_ServerInfo_Emit (net_svc_serverinfo_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_ServerInfo_Parse (net_svc_serverinfo_t *block, msg_t *msg) +NET_SVC_ServerInfo_Parse (net_svc_serverinfo_t *block, qmsg_t *msg) { block->key = MSG_ReadString (msg); block->value = MSG_ReadString (msg); @@ -850,7 +850,7 @@ NET_SVC_Download_Emit (net_svc_download_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Download_Parse (net_svc_download_t *block, msg_t *msg) +NET_SVC_Download_Parse (net_svc_download_t *block, qmsg_t *msg) { block->size = MSG_ReadShort (msg); block->percent = MSG_ReadByte (msg); @@ -905,7 +905,7 @@ NET_SVC_Playerinfo_Emit (net_svc_playerinfo_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Playerinfo_Parse (net_svc_playerinfo_t *block, msg_t *msg) +NET_SVC_Playerinfo_Parse (net_svc_playerinfo_t *block, qmsg_t *msg) { int i; @@ -985,7 +985,7 @@ NET_SVC_Nails_Emit (net_svc_nails_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Nails_Parse (net_svc_nails_t *block, msg_t *msg) +NET_SVC_Nails_Parse (net_svc_nails_t *block, qmsg_t *msg) { int i, j; byte bits[6]; @@ -1024,7 +1024,7 @@ NET_SVC_ChokeCount_Emit (net_svc_chokecount_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_ChokeCount_Parse (net_svc_chokecount_t *block, msg_t *msg) +NET_SVC_ChokeCount_Parse (net_svc_chokecount_t *block, qmsg_t *msg) { block->count = MSG_ReadByte (msg); @@ -1046,7 +1046,7 @@ NET_SVC_Modellist_Emit (net_svc_modellist_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Modellist_Parse (net_svc_modellist_t *block, msg_t *msg) +NET_SVC_Modellist_Parse (net_svc_modellist_t *block, qmsg_t *msg) { int i; @@ -1080,7 +1080,7 @@ NET_SVC_Soundlist_Emit (net_svc_soundlist_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_Soundlist_Parse (net_svc_soundlist_t *block, msg_t *msg) +NET_SVC_Soundlist_Parse (net_svc_soundlist_t *block, qmsg_t *msg) { int i; @@ -1160,7 +1160,7 @@ NET_SVC_Delta_Emit (entity_state_t *es, unsigned int bits, sizebuf_t *buf) // this is a sub-block, not a real block static void -NET_SVC_Delta_Parse (entity_state_t *es, unsigned int bits, msg_t *msg) +NET_SVC_Delta_Parse (entity_state_t *es, unsigned int bits, qmsg_t *msg) { // bytes of bits: [EXT2][EXT1][ORIG][MORE] es->number = bits & 511; @@ -1256,7 +1256,7 @@ NET_SVC_PacketEntities_Emit (net_svc_packetentities_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_PacketEntities_Parse (net_svc_packetentities_t *block, msg_t *msg) +NET_SVC_PacketEntities_Parse (net_svc_packetentities_t *block, qmsg_t *msg) { int word, delta; unsigned short bits; @@ -1310,7 +1310,7 @@ NET_SVC_DeltaPacketEntities_Emit (net_svc_deltapacketentities_t *block, net_status_t NET_SVC_DeltaPacketEntities_Parse (net_svc_deltapacketentities_t *block, - msg_t *msg) + qmsg_t *msg) { int word, delta; unsigned short bits; @@ -1346,7 +1346,7 @@ NET_SVC_MaxSpeed_Emit (net_svc_maxspeed_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_MaxSpeed_Parse (net_svc_maxspeed_t *block, msg_t *msg) +NET_SVC_MaxSpeed_Parse (net_svc_maxspeed_t *block, qmsg_t *msg) { block->maxspeed = MSG_ReadFloat (msg); @@ -1362,7 +1362,7 @@ NET_SVC_EntGravity_Emit (net_svc_entgravity_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_EntGravity_Parse (net_svc_entgravity_t *block, msg_t *msg) +NET_SVC_EntGravity_Parse (net_svc_entgravity_t *block, qmsg_t *msg) { block->gravity = MSG_ReadFloat (msg); @@ -1378,7 +1378,7 @@ NET_SVC_SetPause_Emit (net_svc_setpause_t *block, sizebuf_t *buf) } net_status_t -NET_SVC_SetPause_Parse (net_svc_setpause_t *block, msg_t *msg) +NET_SVC_SetPause_Parse (net_svc_setpause_t *block, qmsg_t *msg) { block->paused = MSG_ReadByte (msg);