Remove useless unaligned write

Little endian systems stored sound as a `uint32_t`, but sent only the
lowest byte.  Store only that byte, since the destination was unaligned
and was the last field in the message.
This commit is contained in:
Kp 2017-08-02 02:49:13 +00:00
parent a6a5f7be82
commit 822249304c

View file

@ -3960,14 +3960,7 @@ void multi_send_sound_function (char whichfunc, char sound)
count++;
multibuf[1]=Player_num; count++;
multibuf[2]=whichfunc; count++;
if (!words_bigendian)
{
*reinterpret_cast<uint32_t *>(multibuf+count)=sound; count++;
}
else
{
multibuf[3] = sound; count++; // this would probably work on the PC as well. Jason?
}
multi_send_data<MULTI_SOUND_FUNCTION>(multibuf,4,2);
}