From e6d642994c1617dba15fc3b0dd99ce5acec56fc5 Mon Sep 17 00:00:00 2001 From: PeekabooSteam Date: Wed, 24 May 2023 21:55:09 +0100 Subject: [PATCH] Improved check for humans --- client/src/units/unitsmanager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/units/unitsmanager.ts b/client/src/units/unitsmanager.ts index 80699b05..9fc61fde 100644 --- a/client/src/units/unitsmanager.ts +++ b/client/src/units/unitsmanager.ts @@ -334,7 +334,7 @@ export class UnitsManager { const selectedUnits = this.getSelectedUnits(); const selectionContainsAHuman = selectedUnits.some( ( unit:Unit ) => { - return unit.getBaseData().AI === false; + return unit.getMissionData().flags.human === true; }); if ( !selectionContainsAHuman || confirm( "Your selection includes a human player. Deleting humans causes their vehicle to crash.\n\nAre you sure you want to do this?" ) ) {