string sample = GlobalSound_sample(gs.m_globalsoundstr, r);
int who = ReadByte();
entity e = entcs_receiver(who - 1);
- int chan = ReadByte();
- chan = (chan & BIT(7) ? -1 : 1) * (chan & BITS(7));
+ int chan = ReadSByte();
float vol = ReadByte() / 255;
float atten = ReadByte() / 64;
vector o;
UpdatePlayerSounds(e);
string s = e.(ps.m_playersoundfld);
string sample = GlobalSound_sample(s, r);
- int chan = ReadByte();
- chan = (chan & BIT(7) ? -1 : 1) * (chan & BITS(7));
+ int chan = ReadSByte();
float vol = ReadByte() / 255;
float atten = ReadByte() / 64;
vector o;
return v;
}
+ int _ReadSByte;
+ #define ReadSByte() (_ReadSByte = ReadByte(), (_ReadSByte & BIT(7) ? -128 : 0) + (_ReadSByte & BITS(7)))
#define ReadFloat() ReadCoord()
vector ReadVector() { vector v; v.x = ReadFloat(); v.y = ReadFloat(); v.z = ReadFloat(); return v; }
vector ReadVector2D() { vector v; v.x = ReadFloat(); v.y = ReadFloat(); v.z = 0; return v; }