case ENT_CLIENT_WARPZONE: WarpZone_Read(bIsNewEntity); break;\r
case ENT_CLIENT_WARPZONE_CAMERA: WarpZone_Camera_Read(bIsNewEntity); break;\r
case ENT_CLIENT_TRIGGER_MUSIC: Ent_ReadTriggerMusic(); break;\r
+ case ENT_CLIENT_PORTRAIT: Ent_ReadPortrait(); break;\r
default:\r
error(strcat("unknown entity type in CSQC_Ent_Update: ", ftos(self.enttype), "\n"));\r
break;\r
const float ENT_CLIENT_WARPZONE = 23;\r
const float ENT_CLIENT_WARPZONE_CAMERA = 24;\r
const float ENT_CLIENT_TRIGGER_MUSIC = 25;\r
+const float ENT_CLIENT_PORTRAIT = 26;\r
\r
const float ENT_CLIENT_TURRET = 40;\r
\r
.float power_sounded;\r
void PlayerPreThink (void)\r
{\r
+ portrait(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
Net_LinkEntity(e, FALSE, 0.1, modeleffect_SendEntity);\r
}\r
\r
+float portrait_SendEntity(entity to, float sf)\r
+{\r
+ WriteByte(MSG_ENTITY, ENT_CLIENT_PORTRAIT);\r
+\r
+ string s;\r
+ s = substring(self.model, 0, strlen(self.model) - 4); // remove extension\r
+ s = strcat(s, "-", ftos(self.skin));\r
+\r
+ WriteString(MSG_ENTITY, s);\r
+\r
+ return TRUE;\r
+}\r
+\r
+void portrait(entity pl)\r
+{\r
+ entity e;\r
+ e = spawn();\r
+ e.classname = "portrait";\r
+ setmodel(e, pl.model);\r
+ e.skin = pl.skin;\r
+\r
+ Net_LinkEntity(e, FALSE, 0.1, portrait_SendEntity);\r
+}\r
+\r
void shockwave_spawn(string m, vector org, float sz, float t1, float t2)\r
{\r
return modeleffect_spawn(m, 0, 0, org, '0 0 0', '0 0 0', '0 0 0', 0, sz, 1, t1, t2);\r