}\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
Returns a valid one in doubt.\r
=============\r
*/\r
-// string FallbackPlayerModel = "models/player/vixen.zym";\r
-string FallbackPlayerModel = "models/onslaught/generator.md3"; // TEMPORARY !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+string FallbackPlayerModel = "models/player/vixen.zym";\r
string CheckPlayerModel(string plyermodel) {\r
if(strlen(plyermodel) < 4)\r
return FallbackPlayerModel;\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
#endif\r
\r
// now change the predator's player model into a stomach model for the prey\r
- // in other words, when a player is swallowed by another player, the eater becomes an inward stomach model so the prey can see theirself in the stomach\r
+ // in other words, when a player is swallowed by another player, the predator becomes an inward stomach model so the prey can see theirself in the stomach\r
// this is only visible to the prey however, otherwise players would appear as a floating stomach to everyone (ewww)\r
\r
// don't do this if we have chase_active enabled, as we'd be seeing a floating stomach from third person view\r
if(other.cvar_chase_active > 0 || other.classname == "observer") // the classname check prevents a bug\r
{\r
Client_setmodel(setmodel_state());\r
- if not(self.eater.classname == "player")\r
+ if not(self.predator.classname == "player")\r
self.alpha = default_player_alpha;\r
return TRUE;\r
}\r
if(other.spectatee_status)\r
other = other.enemy; // also do this for the player we are spectating\r
- if(other.eater == self)\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
Client_setmodel(setmodel_state());\r
- if not(self.eater.classname == "player")\r
+ if not(self.predator.classname == "player")\r
self.alpha = default_player_alpha;\r
return TRUE;\r
}\r
WriteEntity(MSG_ONE, self);\r
}\r
\r
+ Vore_Disconnect();\r
+\r
kh_Key_DropAll(self, TRUE);\r
\r
if(self.flagcarried)\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
remove(self);\r
return;\r
}\r
- if ((self.owner.BUTTON_CHAT && !self.owner.deadflag && self.owner.eater.classname != "player")\r
+ if ((self.owner.BUTTON_CHAT && !self.owner.deadflag && self.owner.predator.classname != "player")\r
#ifdef TETRIS\r
|| self.owner.tetris_on\r
#endif\r
}\r
}\r
\r
-\r
void TeamBubbleThink()\r
{\r
self.nextthink = time;\r
return;\r
}\r
// setorigin(self, self.owner.origin + '0 0 15' + self.owner.maxs_z * '0 0 1'); // bandwidth hog. setattachment does this now\r
- if (self.owner.BUTTON_CHAT || self.owner.deadflag || self.owner.killindicator || self.owner.eater.classname == "player")\r
+ if (self.owner.BUTTON_CHAT || self.owner.deadflag || self.owner.killindicator || self.owner.predator.classname == "player")\r
self.model = "";\r
else\r
- self.model = self.mdl;\r
-\r
+ {\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
+ }\r
};\r
\r
float TeamBubble_customizeentityforclient()\r
// setorigin(self.teambubbleentity, self.origin + '0 0 15' + self.maxs_z * '0 0 1');\r
setorigin(self.teambubbleentity, '0 0 15' + self.maxs_z * '0 0 1');\r
setattachment(self.teambubbleentity, self, ""); // sticks to moving player better, also conserves bandwidth\r
- self.teambubbleentity.mdl = self.teambubbleentity.model;\r
- self.teambubbleentity.model = self.teambubbleentity.mdl;\r
+// self.teambubbleentity.mdl = self.teambubbleentity.model;\r
+// self.teambubbleentity.model = self.teambubbleentity.mdl;\r
self.teambubbleentity.customizeentityforclient = TeamBubble_customizeentityforclient;\r
self.teambubbleentity.effects = EF_LOWPRECISION;\r
}\r
self.stat_eaten = spectatee.stat_eaten;\r
self.stat_stomachload = spectatee.stat_stomachload;\r
self.stat_digesting = spectatee.stat_digesting;\r
+ self.stat_canleave = spectatee.stat_canleave;\r
setorigin(self, spectatee.origin);\r
setsize(self, spectatee.mins, spectatee.maxs);\r
SetZoomState(spectatee.zoomstate);\r
// core code for the vore system\r
Vore();\r
\r
- if(self.spectatee_status)\r
- Vore_Disconnect();\r
-\r
// version nagging\r
if(self.version_nagtime)\r
if(self.cvar_g_voretournamentversion)\r