@ -590,12 +590,17 @@ bool UnPackNetPlayer(const PlayerNetPack &packed, Player &player)
player.InvGrid[i] = packed.InvGrid[i];
for (int i = 0; i < MaxBeltItems; i++) {
if (!UnPackNetItem(player, packed.SpdList[i], player.SpdList[i]))
Item &item = player.SpdList[i];
if (!UnPackNetItem(player, packed.SpdList[i], item))
return false;
if (player.SpdList[i].isEmpty())
if (item.isEmpty())
continue;
auto loc = static_cast<int8_t>(player.GetItemLocation(player.SpdList[i]));
Size beltItemSize = GetInventorySize(item);
ValidateField(loc, loc == ILOC_BELT);
int8_t beltItemType = static_cast<int8_t>(item._itype);
bool beltItemUsable = item.isUsable();
ValidateFields(beltItemSize.width, beltItemSize.height, (beltItemSize == Size { 1, 1 }));
ValidateField(beltItemType, item._itype != ItemType::Gold);
ValidateField(beltItemUsable, beltItemUsable);
}
CalcPlrInv(player, false);
@ -870,6 +870,7 @@ public:
{
Players.resize(2);
MyPlayer = &Players[0];
gbIsMultiplayer = true;
PlayerPack testPack {
0, 0, -1, 9, 0, 2, 61, 24, 0, 0, "MP-Warrior", 0, 120, 25, 60, 60, 37, 0, 85670061, 3921, 13568, 13568, 3904, 3904,