Update HOUSE.CPP

Bugfix, keep Air Defence if enemy has Air units. (Normally it looks only at Human player)
This commit is contained in:
Bast75 2020-06-11 21:52:18 +02:00 committed by GitHub
parent d9e287e08b
commit 0ca71f8fe5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5582,7 +5582,7 @@ int HouseClass::AI_Base_Defense(void)
for (HousesType h = HOUSE_FIRST; h < HOUSE_COUNT; h++) {
HouseClass * house = HouseClass::As_Pointer(h);
if (house && house->IsActive && house->IsHuman && !Is_Ally(house)) {
if (house && house->IsActive && !Is_Ally(house)) {
if ((house->ActiveAScan & (AIRCRAFTF_ORCA|AIRCRAFTF_TRANSPORT|AIRCRAFTF_HELICOPTER)) || (house->ActiveBScan & STRUCTF_HELIPAD)) {
nothreat = false;
break;
@ -8170,4 +8170,4 @@ void HouseClass::Free_Unit_Trackers(void)
delete TotalCrates;
TotalCrates = NULL;
}
}
}