When i drop a uniform/vest/backpack on the ground and relog, their inventory is empty for me after reconnecting (tested client prof & stable).
I wanted to test setUnitLoadout for our loadPlayer function instead of multiple calls/functions to add the gear and while testing i stumbled upon this weird behaviour.
The player unit is created on the server and setUnitLoadout also executed on the server.
Only behaves like that with setUnitLoadout.
Any plausible explanation ?
Before dropping on the ground and re-logging: https://gyazo.com/c651969e4b049f8db9375c16aa23b4af
After re-logging (Inventory of vest/backpack/uniform is empty) : https://gyazo.com/98308fa1224f3dc12eb2ba3c797e06db
To make it even more confusing, if you take the seemingly empty gear and relog again with it equipped. The inventory is correctly filled afterwards
So again get/set unitLoadout is done by the server and after re-logging everything is there again, so it's just a "visual inventory problem" since the data is valid.
Tried to repro with setUnitLoadout on the client instead of the server and there was no problem.
Video demonstration: https://www.youtube.com/watch?v=bwxybZaVcx0
It would be nice to also fix this problem in https://community.bistudio.com/wiki/setUnitLoadout mentioned by Andrew_S90 at the buttom.
If you have two or more magazines with the same bullet count in the Loadout array it refills them when you use setUnitLoadout even tho the data was written properly with the fix from Andrew_S90 .