Merge pull request #2807 from Bumber64/patch-1

Update Units::isFortControlled
develop
Myk 2023-02-05 15:43:31 -08:00 committed by GitHub
commit 3ca2521ce9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

@ -36,6 +36,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## New Plugins
## Fixes
- ``Units::isFortControlled``: Account for agitated wildlife
## Misc Improvements
- `automelt`: is now more resistent to savegame corruption

@ -175,7 +175,8 @@ bool Units::isFortControlled(df::unit *unit)
if (unit->flags2.bits.visitor ||
unit->flags2.bits.visitor_uninvited ||
unit->flags2.bits.underworld ||
unit->flags2.bits.resident)
unit->flags2.bits.resident ||
unit->flags4.bits.agitated_wilderness_creature)
return false;
return unit->civ_id != -1 && unit->civ_id == plotinfo->civ_id;