]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Only send portraits to the proper source
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 29 Jan 2012 20:04:36 +0000 (22:04 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 29 Jan 2012 20:04:36 +0000 (22:04 +0200)
data/qcsrc/server/cl_client.qc
data/qcsrc/server/miscfunctions.qc

index 09172abe248709dae0e106a2dbe4dc0bba78f140..8cc312eef2d30a507db451397c055052577d547a 100644 (file)
@@ -2478,7 +2478,7 @@ void() ctf_setstatus;
 .float power_sounded;\r
 void PlayerPreThink (void)\r
 {\r
-       portrait(self); // TEMPORARY TEST\r
+       portrait(self, self); // TEMPORARY TEST\r
 \r
        self.stat_game_starttime = game_starttime;\r
        self.stat_allow_oldnexbeam = cvar("g_allow_oldnexbeam");\r
index 84f68f7179dcd6ed7ab95b8632f88c11027c85c6..1b5fbda0886a820aab7215553671a4c975e15156 100644 (file)
@@ -2463,6 +2463,9 @@ void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector an
 \r
 float portrait_SendEntity(entity to, float sf)\r
 {\r
+       if(to != self.owner)\r
+               return FALSE;\r
+\r
        WriteByte(MSG_ENTITY, ENT_CLIENT_PORTRAIT);\r
 \r
        string s;\r
@@ -2474,13 +2477,14 @@ float portrait_SendEntity(entity to, float sf)
        return TRUE;\r
 }\r
 \r
-void portrait(entity pl)\r
+void portrait(entity pl, entity targ)\r
 {\r
        entity e;\r
        e = spawn();\r
        e.classname = "portrait";\r
        setmodel(e, pl.model);\r
        e.skin = pl.skin;\r
+       e.owner = targ;\r
 \r
        Net_LinkEntity(e, FALSE, 0.1, portrait_SendEntity);\r
 }\r