]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Simplify server code for portraits
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 29 Jan 2012 20:54:14 +0000 (22:54 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 29 Jan 2012 20:54:14 +0000 (22:54 +0200)
data/qcsrc/server/miscfunctions.qc

index 2d7de74f151dbc181525949763e151ae2538c308..eeb6e6cc4ade7c112efd9c1205d8f4fc6facfcb9 100644 (file)
@@ -2468,9 +2468,9 @@ float portrait_SendEntity(entity to, float sf)
 \r
        WriteByte(MSG_ENTITY, ENT_CLIENT_PORTRAIT);\r
 \r
-       WriteString(MSG_ENTITY, self.model);\r
-       WriteByte(MSG_ENTITY, self.skin);\r
-       WriteString(MSG_ENTITY, self.netname);\r
+       WriteString(MSG_ENTITY, self.owner.model);\r
+       WriteByte(MSG_ENTITY, self.owner.skin);\r
+       WriteString(MSG_ENTITY, self.owner.netname);\r
 \r
        return TRUE;\r
 }\r
@@ -2480,9 +2480,6 @@ void portrait(entity pl, entity targ)
        entity e;\r
        e = spawn();\r
        e.classname = "portrait";\r
-       setmodel(e, pl.model);\r
-       e.skin = pl.skin;\r
-       e.netname = pl.netname;\r
        e.owner = targ;\r
 \r
        Net_LinkEntity(e, FALSE, 0.1, portrait_SendEntity);\r