}\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
self.wasplayer = TRUE;\r
self.iscreature = TRUE;\r
self.movetype = MOVETYPE_WALK;\r
- self.solid = SOLID_SLIDEBOX;\r
+ if(cvar("g_player_colisions"))\r
+ self.solid = SOLID_SLIDEBOX;\r
+ else\r
+ self.solid = SOLID_CORPSE;\r
if(cvar("g_playerclip_collisions"))\r
self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;\r
else\r
WriteString(MSG_ENTITY, world.fog);\r
else\r
WriteString(MSG_ENTITY, "");\r
+ WriteCoord(MSG_ENTITY, cvar("g_campaign"));\r
WriteByte(MSG_ENTITY, cvar("g_balance_armor_blockpercent") * 255.0);\r
WriteByte(MSG_ENTITY, cvar("g_balance_weaponswitchdelay") * 255.0);\r
\r
+ WriteCoord(MSG_ENTITY, cvar("g_vore"));\r
WriteCoord(MSG_ENTITY, cvar("g_balance_vore_swallow_limit"));\r
- WriteCoord(MSG_ENTITY, cvar("g_vore_showpreyhealth"));\r
return TRUE;\r
}\r
\r
self.model = "";\r
else\r
{\r
- if(cvar("g_balance_vore_teamheal") && self.owner.health < cvar("g_balance_vore_teamheal_stable"))\r
+ if(cvar("g_balance_vore_teamheal") && cvar("g_vore_teamvore"))\r
+ if(self.owner.health < cvar("g_balance_vore_teamheal_stable"))\r
setmodel(self, "models/misc/teambubbleheal.spr"); // indicate that this player can be teamhealed\r
else\r
setmodel(self, "models/misc/teambubble.spr");\r