Skip to content

Conversation

@TaranDahl
Copy link
Contributor

  • When a unit disappears (e.g., cloaks, enters a vehicle), the animations attached to it will be hidden instead of removed. Enable this feature through [General] -> KeepAnimOnLimbo=true.

@TaranDahl TaranDahl added ⚙️T1 T1 maintainer review is sufficient ❓Unhardcoding / Customization Make something more tweakable labels Nov 22, 2025
@github-actions
Copy link

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@Starkku
Copy link
Contributor

Starkku commented Nov 22, 2025

There is already per-animation control for this (DetachOnCloak) for cloak only. Should extend it and maybe add a global default instead of adding something completely new.

Comment on lines +565 to +572
DEFINE_HOOK(0x425174, AnimClass_PointerExpired_KeepAnimOnLimbo, 0x6)
{
if (!RulesExt::Global()->KeepAnimOnLimbo)
return 0;

GET_STACK(bool, bRemoved, STACK_OFFSET(0xC, 0x8));
return bRemoved ? 0 : 0x4251A3;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I am fairly certain that what this is doing is blanket preventing deletion of the animation if its parent object is being detached for any reason whatsoever, which seems like it might cause unwanted side effects somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it is.
Actually, I can't understand why WW would remove all the animations attached to it just because the unit disappeared. I think it should actually be hidden rather than removed.

Copy link
Contributor

@Starkku Starkku Nov 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My main concern is that it may skip cases where the removal is warranted e.g destruction as well. But I assume the bRemoved check might take care of that if it is being used correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think are the reasons for removing the animation when the unit disappears? What are the use cases?

Copy link
Contributor

@Starkku Starkku Nov 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If by 'disappear' you mean limbo then there's probably no good reason to delete it vs. hiding since most cases for limboing are temporary anyway. As long as it is deleted if the parent object disappears permanently it should be fine. Overlap with DetachOnCloak should be resolved still, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My main concern is that it may skip cases where the removal is warranted e.g destruction as well. But I assume the bRemoved check might take care of that if it is being used correctly.

I'm actually also worried whether it might cause some problems. But so far, I haven't encountered any during my tests.

@TaranDahl
Copy link
Contributor Author

TODO: deal with DetachOnCloak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs improvement ⚙️T1 T1 maintainer review is sufficient ❓Unhardcoding / Customization Make something more tweakable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants