From: MirceaKitsune Date: Sun, 29 Jan 2012 20:04:36 +0000 (+0200) Subject: Only send portraits to the proper source X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=df70d3db5081fe9b6443ab7447e85faa3812234a;p=voretournament%2Fvoretournament.git Only send portraits to the proper source --- diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 09172abe..8cc312ee 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -2478,7 +2478,7 @@ void() ctf_setstatus; .float power_sounded; void PlayerPreThink (void) { - portrait(self); // TEMPORARY TEST + portrait(self, self); // TEMPORARY TEST self.stat_game_starttime = game_starttime; self.stat_allow_oldnexbeam = cvar("g_allow_oldnexbeam"); diff --git a/data/qcsrc/server/miscfunctions.qc b/data/qcsrc/server/miscfunctions.qc index 84f68f71..1b5fbda0 100644 --- a/data/qcsrc/server/miscfunctions.qc +++ b/data/qcsrc/server/miscfunctions.qc @@ -2463,6 +2463,9 @@ void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector an float portrait_SendEntity(entity to, float sf) { + if(to != self.owner) + return FALSE; + WriteByte(MSG_ENTITY, ENT_CLIENT_PORTRAIT); string s; @@ -2474,13 +2477,14 @@ float portrait_SendEntity(entity to, float sf) return TRUE; } -void portrait(entity pl) +void portrait(entity pl, entity targ) { entity e; e = spawn(); e.classname = "portrait"; setmodel(e, pl.model); e.skin = pl.skin; + e.owner = targ; Net_LinkEntity(e, FALSE, 0.1, portrait_SendEntity); }