Improved check for humans

This commit is contained in:
PeekabooSteam 2023-05-24 21:55:09 +01:00
parent 4e9eab2cce
commit e6d642994c

View File

@ -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?" ) ) {