#ifdef CSQC
void Inventory_Read(Inventory data)
{
+ make_pure(self);
const int bits = ReadInt24_t();
FOREACH(Items, bits & BIT(it.m_id), LAMBDA(
.int fld = inv_items[it.m_id];
#ifdef SVQC
bool Inventory_Send(entity this, entity to, int sf)
{
- WriteByte(MSG_ENTITY, ENT_CLIENT_INVENTORY);
+ WriteHeader(MSG_ENTITY, ENT_CLIENT_INVENTORY);
entity e = self.owner;
if (/*IS_SPEC(e)*/ (e.classname == "spectator")) e = e.enemy;
Inventory data = e.inventory;
void Inventory_new(entity e)
{
Inventory inv = new(Inventory), bak = new(Inventory);
- inv.classname = bak.classname = "inventory";
+ make_pure(inv); make_pure(bak);
inv.inventory = bak;
inv.drawonlytoclient = e;
Net_LinkEntity((inv.owner = e).inventory = inv, false, 0, Inventory_Send);