Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjustment to garrison logic to support trenches #413

Open
WirtsLegs opened this issue Oct 9, 2024 · 0 comments
Open

Adjustment to garrison logic to support trenches #413

WirtsLegs opened this issue Oct 9, 2024 · 0 comments

Comments

@WirtsLegs
Copy link

Describe your requested feature

Currently the garrison logic filters out positions that are not actually indoors by checking for an object above the building position

This works well for actual buildings but breaks down when trying to use it for trenches etc.

I would propose a change that would make it prioritize indoor positions when such positions are available, but if none are it should use outdoor positions 100% of the time as long as they are available.

nk3nny added a commit that referenced this issue Oct 9, 2024
Adds garrisoned units that are placed outside will appear to look out from building
Improves garrison behaviour when there are no outdoor locations (fixes issue #413)
Fixes units being teleported to building positions located in air
Fixes taskCamp units sometimes throwing double animation resets
Fixes taskCamp units failing to reset animations

--
Prefers using setVehiclePosition rather than setPos when placing units.  While more expensive, taskGarrison and taskCamp are not run frequently.  This neatly fixes many issues where units were spawned in the air (and fell to their deaths!)

With the new and improved eventhandlers reseting animations in taskCampReset is much more reliable. Therefore no need to run the function multiple times on all units.
nk3nny added a commit that referenced this issue Oct 14, 2024
Adds garrisoned units that are placed outside will appear to look out from building
Improves garrison behaviour when there are no outdoor locations (fixes issue #413)
Fixes units being teleported to building positions located in air
Fixes taskCamp units sometimes throwing double animation resets
Fixes taskCamp units failing to reset animations

--
Prefers using setVehiclePosition rather than setPos when placing units.  While more expensive, taskGarrison and taskCamp are not run frequently.  This neatly fixes many issues where units were spawned in the air (and fell to their deaths!)

With the new and improved eventhandlers reseting animations in taskCampReset is much more reliable. Therefore no need to run the function multiple times on all units.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant