Page MenuHomeFeedback Tracker

getUnitLoadout in HandleDisconnect reports empty facewear after adding with setUnitLoadout
New, NormalPublic

Description

After using setUnitLoadout to set a player loadout in which facewear is set (index 7) using getUnitLoadout inside a HandleDisconnect code will contain an empty string for facewear instead of the facewear that was actually added.

Works fine when used with addGoggles for example.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
  • Load into a dedicated server
  • Add a facewear on the player using setUnitLoadout:
LOADOUT = getUnitLoadout player;
LOADOUT set [7, "G_Bandanna_shades"];
player setUnitLoadout LOADOUT;
  • Add log on server (server execute):
addMissionEventHandler ["HandleDisconnect", {diag_log (getUnitLoadout (_this select 0))}];
  • Disconnect (going back to lobby is enough)
  • Check server RPT and see that facewear entry is empty ""

Event Timeline

Jonpas created this task.Mar 22 2017, 9:18 PM