{
entity ps = PlayerSounds_from(ReadByte());
float r = ReadByte() / 255;
- int who = ReadByte();
- entity e = entcs_receiver[who - 1];
+ int who = ReadByte() - 1;
+ entity e = entcs_receiver[who];
UpdatePlayerSounds(e);
string s = e.(ps.m_playersoundfld);
string sample = GlobalSound_sample(s, r);
}
else
{
- LOG_WARNINGF("Missing entcs data for player %i\n", e);
+ LOG_WARNINGF("Missing entcs data for player %d\n", who);
// Can this happen?
entity e = new(playersound);
e.origin = o;
&& player.deadflag == DEAD_NO // player must be alive
|| player == to // player is self
;
- if (!valid) return false;
+ if (!valid) sf = 0;
WriteHeader(MSG_ENTITY, ENT_CLIENT_ENTCS);
WriteShort(MSG_ENTITY, sf);
int i = 1;
.int Version; // deprecated, use SendFlags
.int SendFlags;
.bool(entity to, int sendflags) SendEntity;
+ /** return false to remove from the client */
.bool(entity this, entity to, int sendflags) SendEntity3;
bool SendEntity_self(entity to, int sendflags) { return self.SendEntity3(self, to, sendflags); }