From df70d3db5081fe9b6443ab7447e85faa3812234a Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 29 Jan 2012 22:04:36 +0200 Subject: [PATCH] Only send portraits to the proper source --- data/qcsrc/server/cl_client.qc | 2 +- data/qcsrc/server/miscfunctions.qc | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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); } -- 2.39.2