dead flag -> !isActive

develop
PatrikLundell 2018-06-14 12:31:15 +02:00
parent aa361f3a0d
commit da0aa85b05
1 changed files with 2 additions and 2 deletions

@ -383,7 +383,7 @@ void AnimalHospital::processPatients(color_ostream &out) {
}
// Check to make sure the unit hasn't expired before assigning a job, or if they've been healed
if (!real_unit || real_unit->flags1.bits.dead || !real_unit->health->flags.bits.needs_healthcare) {
if (!real_unit || !Units::isActive(real_unit) || !real_unit->health->flags.bits.needs_healthcare) {
// discharge the patient from the hospital
this->dischargePatient(*patient, out);
return;
@ -624,7 +624,7 @@ processUnits:
df::unit* unit = units[a];
/* As hilarious as it would be, lets not treat FB :) */
if ( unit->flags1.bits.dead || unit->flags1.bits.active_invader || unit->flags2.bits.underworld || unit->flags2.bits.visitor_uninvited || unit->flags2.bits.visitor ) {
if ( !Units::isActive(unit) || unit->flags1.bits.active_invader || unit->flags2.bits.underworld || unit->flags2.bits.visitor_uninvited || unit->flags2.bits.visitor ) {
continue;
}