From 9b3f3905b5cc6116371e911516fd57f88d6407f3 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 26 Jun 2012 10:51:11 +0900 Subject: [PATCH] Make CL_ParseStartSoundPacket easier to read. Really just add a "bits" var from which to extract the info rather than overloading "channel". --- qw/source/cl_parse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qw/source/cl_parse.c b/qw/source/cl_parse.c index 473801ab7..a1d91655c 100644 --- a/qw/source/cl_parse.c +++ b/qw/source/cl_parse.c @@ -1006,17 +1006,17 @@ static void CL_ParseStartSoundPacket (void) { float attenuation; - int channel, ent, sound_num, volume; + int bits, channel, ent, sound_num, volume; vec3_t pos; - channel = MSG_ReadShort (net_message); + bits = MSG_ReadShort (net_message); - if (channel & SND_VOLUME) + if (bits & SND_VOLUME) volume = MSG_ReadByte (net_message); else volume = DEFAULT_SOUND_PACKET_VOLUME; - if (channel & SND_ATTENUATION) + if (bits & SND_ATTENUATION) attenuation = MSG_ReadByte (net_message) / 64.0; else attenuation = DEFAULT_SOUND_PACKET_ATTENUATION; @@ -1025,8 +1025,8 @@ CL_ParseStartSoundPacket (void) MSG_ReadCoordV (net_message, pos); - ent = (channel >> 3) & 1023; - channel &= 7; + ent = (bits >> 3) & 1023; + channel = bits & 7; if (ent > MAX_EDICTS) Host_Error ("CL_ParseStartSoundPacket: ent = %i", ent);