HomeWildfire Games

Enable garrisoning on gates / fix movement of units with visible garrison…

Description

Enable garrisoning on gates / fix movement of units with visible garrison points (2nd commit)

This is the same commit as rP23710 / D1418, fixing noted issues.

This addresses two related issues:

  • Units visibly garrisoned on gates keep the gate open.
  • Units visibly garrisoned on entities keep their pathfinding blocker flags.

De-activate the obstruction of visibly-garrisoned entities, fixing the 2nd issue.
Keep a list of entities that cannot move and thus should not count towards gate-opening logic.

Packing logic is kept separate: it is more related to entities having 'alternate forms' with different capabilities than being currently incapable of moving.

Based on work by temple

Fixes #2679.
Fixes #5151.

Differential Revision: https://code.wildfiregames.com/D2775

Event Timeline

Nescio added a subscriber: Nescio.Jun 3 2020, 12:08 PM

Thanks. I rebuilt the game and tried it out in combination with D2760. Everything seems to work fine.
One minor thing is that locked gates still play an opening-and-closing animation when garrisoning or ungarrisoning units; I suppose that's an art problem?

One minor thing is that locked gates still play an opening-and-closing animation when garrisoning or ungarrisoning units; I suppose that's an art problem?

hmm, that seems like it's trying to close again when already closed, which shouldn't happen. Perhaps it's an art issue as we end up resetting some animation timer. I'll check.

Angen added a subscriber: Angen.Jun 3 2020, 12:17 PM

hmm, that seems like it's trying to close again when already closed, which shouldn't happen. Perhaps it's an art issue as we end up resetting some animation timer. I'll check.

I believe garrison holder is still setting garrisoned flag for variants and art replays animations on variant change if it has active animation.

I believe garrison holder is still setting garrisoned flag for variants and art replays animations on variant change if it has active animation.

Correct, thanks -> GarrisonHolder calls UpdateGarrisonFlag on PerformGarrison which sets the variant and the probably resets.
Not a bug in the diff then, still should probably be fixed.

Kinda hackish solution in D2969.

Freagarach added inline comments.Jan 7 2021, 3:54 PM
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
631

Interesting how we would get here when this.AbleToMove() is always false when this.IsGarrisoned() is true.