]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Network the player name in portraits. Also move my test to Damage so I can test the...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 29 Jan 2012 20:10:19 +0000 (22:10 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 29 Jan 2012 20:10:19 +0000 (22:10 +0200)
data/qcsrc/client/hud.qc
data/qcsrc/server/cl_client.qc
data/qcsrc/server/g_damage.qc
data/qcsrc/server/miscfunctions.qc

index 936804609d2715b6f3d0afe9b4e30df0bfc04e91..282b1fa1001750c98e1137784f94027891d694ee 100644 (file)
@@ -3553,8 +3553,10 @@ void CSQC_race_hud(void)
 \r
 void Ent_ReadPortrait()\r
 {\r
-       string s;\r
+       string s, n;\r
        s = ReadString();\r
+       n = ReadString();\r
 \r
        dprint(strcat(s, " --------\n"));\r
+       dprint(strcat(n, " --------\n"));\r
 }\r
index 8cc312eef2d30a507db451397c055052577d547a..33406554dd2ac92b7a0780b3b54c26205b6719ee 100644 (file)
@@ -2478,8 +2478,6 @@ void() ctf_setstatus;
 .float power_sounded;\r
 void PlayerPreThink (void)\r
 {\r
-       portrait(self, self); // TEMPORARY TEST\r
-\r
        self.stat_game_starttime = game_starttime;\r
        self.stat_allow_oldnexbeam = cvar("g_allow_oldnexbeam");\r
        self.stat_leadlimit = cvar("leadlimit");\r
index a628a8921374355657ad5f16c4af335b9524415a..f2e6d2a60a78442fd2705cf2dc404a443cce5746 100644 (file)
@@ -653,6 +653,8 @@ entity damage_attacker;
 \r
 void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)\r
 {\r
+       portrait(attacker, attacker); // TEMPORARY TEST\r
+\r
        float mirrordamage;\r
        float mirrorforce;\r
        float teamdamage0;\r
index 1b5fbda0886a820aab7215553671a4c975e15156..bd66439fde78b8cdcab5546343f9316424879194 100644 (file)
@@ -2473,6 +2473,7 @@ float portrait_SendEntity(entity to, float sf)
        s = strcat(s, "-", ftos(self.skin));\r
 \r
        WriteString(MSG_ENTITY, s);\r
+       WriteString(MSG_ENTITY, self.netname);\r
 \r
        return TRUE;\r
 }\r
@@ -2484,6 +2485,7 @@ void portrait(entity pl, entity targ)
        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