=============\r
*/\r
.entity chatbubbleentity;\r
-.entity teambubbleentity;\r
void ReadyCount();\r
void ClientDisconnect (void)\r
{\r
if (self.chatbubbleentity)\r
remove (self.chatbubbleentity);\r
\r
- if (self.teambubbleentity)\r
- remove (self.teambubbleentity);\r
-\r
if (self.killindicator)\r
remove (self.killindicator);\r
\r
}\r
}\r
\r
-void TeamBubbleThink()\r
-{\r
- self.nextthink = time;\r
- if (!self.owner.modelindex || self.owner.teambubbleentity != self)\r
- {\r
- if(self.owner) // but why can that ever be world?\r
- self.owner.teambubbleentity = world;\r
- remove(self);\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.stat_eaten)\r
- self.model = "";\r
- else\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
-{\r
- return (self.owner != other && self.owner.team == other.team && other.killcount > -666);\r
-}\r
-\r
-void UpdateTeamBubble()\r
-{\r
- if (!self.modelindex || !teams_matter)\r
- return;\r
- // spawn a teambubble entity if needed\r
- if (!self.teambubbleentity && teams_matter)\r
- {\r
- self.teambubbleentity = spawn();\r
- self.teambubbleentity.owner = self;\r
- self.teambubbleentity.exteriormodeltoclient = self;\r
- self.teambubbleentity.think = TeamBubbleThink;\r
- self.teambubbleentity.nextthink = time;\r
- setmodel(self.teambubbleentity, "models/misc/teambubble.spr"); // precision set below\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.customizeentityforclient = TeamBubble_customizeentityforclient;\r
- self.teambubbleentity.effects = EF_LOWPRECISION;\r
- }\r
-}\r
-\r
// LordHavoc: this hack will be removed when proper _pants/_shirt layers are\r
// added to the model skins\r
/*void UpdateColorModHack()\r
if(self.classname == "player") {\r
CheckRules_Player();\r
UpdateChatBubble();\r
- UpdateTeamBubble();\r
if (self.impulse)\r
ImpulseCommands();\r
if (intermission_running)\r