Skip to content

[GEN][ZH] Fixes "Box" particle systems. #756

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OmniBlade
Copy link

A break statement was in the wrong scope leading to hollow boxes behaving as though they were line systems.

A break statement was in the wrong scope leading to hollow boxes behaving as though they were line systems.
@OmniBlade OmniBlade requested review from tomsons26, feliwir, xezon and a team April 24, 2025 10:27
@Mauller
Copy link

Mauller commented Apr 24, 2025

Looks legit to me, Although it may want testing for compat issues first as it does affect the way the positions are calculated.

@Mauller Mauller added Minor Severity: Minor < Major < Critical < Blocker Generals Related Generals only ZeroHour Relates to Zero Hour GameMismatchWith104Maybe Maybe affects game state towards original 1.04 labels Apr 24, 2025
@OmniBlade
Copy link
Author

Looks legit to me, Although it may want testing for compat issues first as it does affect the way the positions are calculated.

Indeed, it will likely affect any mods that used hollow boxes, but I don't think there are any such particle systems in the base games or this bug would have been noticed during development I guess? I actually spotted this bug during Thyme development, just came to mind today to look for what the issue was in the original code.

@xezon
Copy link

xezon commented Apr 24, 2025

What will happen player facing with this bug?

@OmniBlade
Copy link
Author

What will happen player facing with this bug?

Players should never have seen this bug because it essentially breaks the hollow box particle system and make its behave as though it were a line system. I don't believe any retail particle systems use hollow box and I'd be suprised if any mods do as if they tried they'd quickly discover it doesn't look how they intended. All the fix really does is open up the possiblity of using a hollow box particle system as it was intended.

@tomsons26
Copy link

tomsons26 commented Apr 24, 2025

If anything does use BOX then this is a guaranteed mismatch with 1.04 due to it falling into LINE and calling GameClientRandomValueReal which then would throw the entire RNG out of sync

@xezon xezon added the Do Later Work on this later label Apr 24, 2025
@roossienb
Copy link

If anything does use BOX then this is a guaranteed mismatch with 1.04 due to it falling into LINE and calling GameClientRandomValueReal which then would throw the entire RNG out of sync

Is there a way to figure out what elements in the game would potentially use BOX? because then we can perform some (re)play testing?

@Mauller
Copy link

Mauller commented May 1, 2025

If anything does use BOX then this is a guaranteed mismatch with 1.04 due to it falling into LINE and calling GameClientRandomValueReal which then would throw the entire RNG out of sync

Is there a way to figure out what elements in the game would potentially use BOX? because then we can perform some (re)play testing?

you could breakpoint the switch and see if it ever falls into box.
This way we can at least tell if the game ever uses this type of particle system.

@tomsons26
Copy link

tomsons26 commented May 1, 2025

Well, dunno if game arbitrarily makes BOX particles but there's 15 with VolumeType = BOX in ParticleSystem.ini
Question is are they used ingame

@OmniBlade
Copy link
Author

Well, dunno if game arbitrarily makes BOX particles but there's 15 with VolumeType = BOX in ParticleSystem.ini Question is are they used ingame

The bug is specific to BOX systems that have m_isEmissionVolumeHollow set. None hollow boxes will work correctly as the break is originally within that scope.

@tomsons26
Copy link

Well, dunno if game arbitrarily makes BOX particles but there's 15 with VolumeType = BOX in ParticleSystem.ini Question is are they used ingame

The bug is specific to BOX systems that have m_isEmissionVolumeHollow set. None hollow boxes will work correctly as the break is originally within that scope.

seems none of the 15 are hallow luckly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Later Work on this later GameMismatchWith104Maybe Maybe affects game state towards original 1.04 Generals Related Generals only Minor Severity: Minor < Major < Critical < Blocker ZeroHour Relates to Zero Hour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants