When units are moved between groups with join or joinSilent commands, deleteGroupWhenEmpty flag is totally ignored and the group is deleted in the same frame.
Description
Description
Details
Details
- Severity
- Major
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- Scripting
Steps To Reproduce
Put a player unit in the editor, start it, and run this code in the console:
group0 = createGroup [WEST, false]; group1 = createGroup [WEST, false]; _flag = isGroupDeletedWhenEmpty group0; group0 deleteGroupWhenEmpty false; group0 createUnit [typeof player, getpos player, [], 5, "NONE"]; group0 createUnit [typeof player, getpos player, [], 5, "NONE"]; (units group0) join group1; [_flag, isNull group0]
The code returns [false, true], meaning that the group is deleted, despite the 'delete when empty' flag returning false.