From: MirceaKitsune Date: Sun, 29 Jan 2012 20:10:19 +0000 (+0200) Subject: Network the player name in portraits. Also move my test to Damage so I can test the... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0cd4ae2a1544f1e31319404b5dc9b1fad363b9ea;p=voretournament%2Fvoretournament.git Network the player name in portraits. Also move my test to Damage so I can test the triggered event more easily --- diff --git a/data/qcsrc/client/hud.qc b/data/qcsrc/client/hud.qc index 93680460..282b1fa1 100644 --- a/data/qcsrc/client/hud.qc +++ b/data/qcsrc/client/hud.qc @@ -3553,8 +3553,10 @@ void CSQC_race_hud(void) void Ent_ReadPortrait() { - string s; + string s, n; s = ReadString(); + n = ReadString(); dprint(strcat(s, " --------\n")); + dprint(strcat(n, " --------\n")); } diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 8cc312ee..33406554 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -2478,8 +2478,6 @@ void() ctf_setstatus; .float power_sounded; void PlayerPreThink (void) { - portrait(self, self); // TEMPORARY TEST - self.stat_game_starttime = game_starttime; self.stat_allow_oldnexbeam = cvar("g_allow_oldnexbeam"); self.stat_leadlimit = cvar("leadlimit"); diff --git a/data/qcsrc/server/g_damage.qc b/data/qcsrc/server/g_damage.qc index a628a892..f2e6d2a6 100644 --- a/data/qcsrc/server/g_damage.qc +++ b/data/qcsrc/server/g_damage.qc @@ -653,6 +653,8 @@ entity damage_attacker; void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) { + portrait(attacker, attacker); // TEMPORARY TEST + float mirrordamage; float mirrorforce; float teamdamage0; diff --git a/data/qcsrc/server/miscfunctions.qc b/data/qcsrc/server/miscfunctions.qc index 1b5fbda0..bd66439f 100644 --- a/data/qcsrc/server/miscfunctions.qc +++ b/data/qcsrc/server/miscfunctions.qc @@ -2473,6 +2473,7 @@ float portrait_SendEntity(entity to, float sf) s = strcat(s, "-", ftos(self.skin)); WriteString(MSG_ENTITY, s); + WriteString(MSG_ENTITY, self.netname); return TRUE; } @@ -2484,6 +2485,7 @@ void portrait(entity pl, entity targ) e.classname = "portrait"; setmodel(e, pl.model); e.skin = pl.skin; + e.netname = pl.netname; e.owner = targ; Net_LinkEntity(e, FALSE, 0.1, portrait_SendEntity);