Page MenuHomeFeedback Tracker

Disassembled UAV groups aren't cleaned up
Closed, ResolvedPublic


When disassembling the UAV the game deletes its crew but doesn't delete the group, which remains empty in game forever since it doesn't have its isGroupDeletedWhenEmpty set. This is a bad practice as missions with UAVs and without special handling for this issue will end up with lots of empty useless groups.

Solution would be to set isGroupDeletedWhenEmpty flag to engine-created groups so they're cleaned up after emptying.


Operating System
Windows 10 x64
UAV (Unmanned Aerial Vehicle)
Steps To Reproduce
  1. Start a game with a player
  2. Execute player addBackpack "B_UGV_02_Demining_backpack_F" to get yourself a UGV backpack
  3. Execute:
	if(isNil"testeh") then {
		testeh = player addEventHandler ["WeaponAssembled", {call assembledfunc}];
		arr = [];

	assembledfunc = {
		params ["_unit", "_vehicle"];

		arr pushBack group _vehicle;

	onEachFrame {
		hintSilent (arr apply {[str _x, format["isGroupDeletedWhenEmpty=%1", isGroupDeletedWhenEmpty _x], str units _x] joinString "\n"} joinString "\n\n");
  1. Assemble the UGV, observe new group and its units in the hint
  2. Disassemble the UGV, observe that units were deleted but group remains
  3. Repeat assembly and disassembly and observe empty groups stacking up
Additional Information

I wish we could control deletion of UAV units by the engine too.

Event Timeline

SaMatra created this task.Mar 30 2023, 6:03 AM
SaMatra updated the task description. (Show Details)Mar 30 2023, 6:11 AM
SaMatra edited Steps To Reproduce. (Show Details)Mar 30 2023, 10:06 AM
BIS_fnc_KK set Ref Ticket to AIII-55642.Mar 31 2023, 10:15 AM
BIS_fnc_KK edited Steps To Reproduce. (Show Details)

Revision: 150435

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Apr 2 2023, 10:59 AM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.
SaMatra added a comment.EditedApr 2 2023, 3:36 PM

Didn't check what exactly changed yet (is group deleted or has delete when empty flag set?) but I noticed that you can't get that empty group when vehicle is dissembled unless you put it into a variable. Lets expand Disassembled event handler to also include reference to the group that deleted units had?

The group has deletewhenempty flag set to true now. Make another ticket for that other thing with repro

Tested, looks fine. Won't bother with extending Disassembled event handler, not critical at all.

Fixed, can be closed as resolved.

Leopard20 closed this task as Resolved.Mon, Sep 11, 1:45 PM