-
Notifications
You must be signed in to change notification settings - Fork 479
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
Raiding units aren't flagged inactive, update code and docs #4948
Conversation
* Add docs for units.isInPlay * Update docs w/r/t item/unit active assumptions
Since we're ruling out inactive non-dead units, prevent raiding unit jank.
* Update changelog.txt * Update Lua API.rst * Update LuaApi.cpp * Update Units.h * Update Units.cpp
Couldn't find any places in existing code that would benefit from a |
|
Replaced by #4959 |
Add(DF unsets theUnits::isInPlay
fn to checkisActive
then scanunits.active
. Useful when you've got a unit pointer, but you don't know if it's in the active units vector.inactive
flag a few ticks after raiding units leave the map.)Updated some code and docs using this info. I would've changed the
isActive
function, but there may be performance concerns. Would be great if Bay12 could just use a flag for this, but we can't count on raiding bugs being fixed this decade.Made
getUnitsInBox
rule out inactive units by default, since death and map edge locations aren't where the unit actually is.