//void() ctf_playerchanged;\r
void PutClientInServer (void)\r
{\r
+ entity e;\r
+\r
if(clienttype(self) == CLIENTTYPE_BOT)\r
{\r
self.classname = "player";\r
\r
Vore_Disconnect();\r
self.swallow_progress_pred = self.swallow_progress_prey = 0;\r
+ for(e = world; (e = find(e, classname, "consumable")); )\r
+ {\r
+ // remove consumable items when we respawn\r
+ if(e.predator == self)\r
+ {\r
+ e.nextthink = 0;\r
+ remove(e);\r
+ e = world;\r
+ }\r
+ }\r
\r
self.classname = "player";\r
self.wasplayer = TRUE;\r
weapon_action(j, WR_RESETPLAYER);\r
\r
// all weapons must be fully loaded when we spawn\r
- entity e;\r
e = get_weaponinfo(j);\r
if(e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars\r
self.(weapon_load[j]) = cvar(strcat("g_balance_", e.netname, "_reload_ammo"));\r
return;\r
}\r
\r
+ if(self.predator.classname != "player")\r
+ {\r
+ // no longer a player, remove consumable items\r
+ Item_Consumable_Remove();\r
+ return;\r
+ }\r
+ if(self.predator.stat_eaten)\r
+ {\r
+ // prey can't hold consumable items\r
+ Item_Consumable_Remove();\r
+ return;\r
+ }\r
+\r
dprint("!!!!!!!!\n");\r
self.nextthink = time;\r
}\r