REGISTER_NET_LINKED(ENT_CLIENT_INVENTORY)
-const int Inventory_groups_major = 16;
-const int Inventory_groups_minor = 8; // ceil(Items_MAX / Inventory_groups_major)
+const int Inventory_groups_minor = 8; // exactly 1 byte
+const int Inventory_groups_major = 3; // ceil(Items_MAX / Inventory_groups_minor)
#define G_MAJOR(id) (floor((id) / Inventory_groups_minor))
#define G_MINOR(id) ((id) % Inventory_groups_minor)
{
make_pure(this);
g_inventory = this;
- const int majorBits = ReadShort();
+ const int majorBits = ReadByte();
for (int i = 0; i < Inventory_groups_major; ++i) {
if (!(majorBits & BIT(i))) {
continue;
minorBitsArr[maj] = BITSET(minorBitsArr[maj], BIT(G_MINOR(it.m_id)), true);
}
});
- WriteShort(MSG_ENTITY, majorBits);
+ WriteByte(MSG_ENTITY, majorBits);
for (int i = 0; i < Inventory_groups_major; ++i)
{
#pragma once
-const int AMMO_COUNT = 4; // amount of ammo types to show in the inventory panel
+const int AMMO_COUNT = 4; // amount of ammo types to show in the ammo panel
// item networking
const int ISF_LOCATION = BIT(1);