Page MenuHomeFeedback Tracker

setUnitLoadout (serverExec) Inventory Problem
New, NormalPublic


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:
After re-logging (Inventory of vest/backpack/uniform is empty) :

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:

It would be nice to also fix this problem in 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 .


Operating System
Windows 10 x64
Steps To Reproduce

Create a player unit on the server and use setUnitloadOut for equipping also on the server.
Take control of the unit and drop your Uniform/Vest/Backpack with gear inside on the ground and logout.

On re-connect the gear you dropped before seems empty.
If you re-equip it and use getUnitLoadout on the server it shows that the gear is not empty for the server.

Related Objects


Event Timeline

ElRabito created this task.Apr 5 2022, 8:17 PM
ElRabito updated the task description. (Show Details)
ElRabito edited Steps To Reproduce. (Show Details)
ElRabito updated the task description. (Show Details)Apr 5 2022, 8:58 PM
LouMontana closed subtask Restricted Maniphest Task as Resolved.Apr 6 2022, 6:30 PM

Resolved, or wontResolve?

Wetzer added a subscriber: Wetzer.Apr 6 2022, 8:35 PM

Resolved, or wontResolve?

Neither. It's open.

ElRabito updated the task description. (Show Details)Apr 7 2022, 7:29 PM