}\r
\r
void AnnounceTo(entity e, string snd) {\r
- msg_entity = e;\r
- WriteByte(MSG_ONE, SVC_TEMPENTITY);\r
- WriteByte(MSG_ONE, TE_CSQC_ANNOUNCE);\r
- WriteString(MSG_ONE, snd);\r
+ if (clienttype(e) == CLIENTTYPE_REAL)\r
+ {\r
+ msg_entity = e;\r
+ WriteByte(MSG_ONE, SVC_TEMPENTITY);\r
+ WriteByte(MSG_ONE, TE_CSQC_ANNOUNCE);\r
+ WriteString(MSG_ONE, snd);\r
+ }\r
}\r
\r
float ClientData_Send(entity to, float sf)\r
// set the proper belly model depending on how full we are\r
string newmodel_name, newmodel_extension, applymodel;\r
\r
- tokenizebyseparator(self.playermodel, ".");\r
- newmodel_name = argv(0);\r
- newmodel_extension = argv(1);\r
+ // 4 is the extension length\r
+ newmodel_name = substring(self.playermodel, 0, strlen(self.playermodel) - 4);\r
+ newmodel_extension = substring(self.playermodel, strlen(self.playermodel) - 4, 4);\r
\r
- if(self.stomach_load >= 3)\r
- applymodel = strcat(newmodel_name, "_state3.", newmodel_extension);\r
- else if(self.stomach_load >= 2)\r
- applymodel = strcat(newmodel_name, "_state2.", newmodel_extension);\r
- else if(self.stomach_load >= 1)\r
- applymodel = strcat(newmodel_name, "_state1.", newmodel_extension);\r
+ if(self.stomach_load)\r
+ applymodel = strcat(newmodel_name, "_state", ftos(floor(self.stomach_load)), newmodel_extension);\r
else\r
applymodel = self.playermodel;\r
\r
float Client_customizeentityforclient()\r
{\r
entity modelsource;\r
+ string applymodel;\r
\r
if(self.modelindex == 0)\r
return TRUE;\r
other = other.enemy; // also do this for the player we are spectating\r
if(other.predator == self)\r
{\r
- tokenizebyseparator(self.playermodel, ".");\r
- Client_setmodel(strcat(argv(0), "_stomach.md3"));\r
+ applymodel = strcat(substring(self.playermodel, 0, strlen(self.playermodel) - 4), "_stomach.md3"); // 4 is the extension length\r
+ Client_setmodel(applymodel);\r
self.alpha = other.cvar_cl_vore_stomachmodel;\r
return TRUE;\r
}\r
WriteByte(MSG_ENTITY, cvar("g_balance_weaponswitchdelay") * 255.0);\r
\r
WriteCoord(MSG_ENTITY, cvar("g_balance_vore_swallow_limit"));\r
- WriteCoord(MSG_ENTITY, cvar("g_vore_showpreyhealth"));\r
+ WriteCoord(MSG_ENTITY, cvar("g_vore_showhealth"));\r
return TRUE;\r
}\r
\r