Skip to content

unify(particlesys): Merge and move W3DParticleSys to core#3014

Open
stephanmeesters wants to merge 2 commits into
TheSuperHackers:mainfrom
stephanmeesters:unify/w3dparticlesys
Open

unify(particlesys): Merge and move W3DParticleSys to core#3014
stephanmeesters wants to merge 2 commits into
TheSuperHackers:mainfrom
stephanmeesters:unify/w3dparticlesys

Conversation

@stephanmeesters

@stephanmeesters stephanmeesters commented Jul 26, 2026

Copy link
Copy Markdown

Merge by rebase

This merges and moves W3DParticleSys.h and W3DParticleSys.cpp.

Generals gets:

  • Ability to render smudges (TheSmudgeManager is non-null but we don't expect to see any smudges in the data)
  • Ability to render weather effects (not used, TheSnowManager is null)
  • Removes unnecessary check for invisible particles (added to GeneralsMD to test but it never triggered a breakpoint)

for (Particle *p = sys->getFirstParticle(); p; p = p->m_systemNext)
{
// do not attempt to render totally invisible particles
if (p->isInvisible())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There have been bugs reported in ZH where invisible particles are rendered. Could this be a cause? Wouldn't it therefore be better to merge this Generals code to Zero Hour instead.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Do you mean the recent report where particles were being created under the terrain? Because this function wouldn't catch those. Didn't find any issues related to invisible particles in the list, would be interested to investigate

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yes I meant that report.
The code in Generals makes sense without context. So the question is why it was removed in ZH and whether that was correct or a mistake.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I suspect this was removed because it was deemed unnecessary when invisible particles will be deleted in the logic update.

You could put a breakpoint here and see if that is ever called, or how much, and see if it carries any merit.

It probably does not.

@stephanmeesters stephanmeesters Jul 27, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Tested with a breakpoint before in ZH, now also tested with a breakpoint in vGenerals, did not see it get triggered.

@xezon xezon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Commit titles need polishing

@xezon xezon added Gen Relates to Generals ZH Relates to Zero Hour Unify Unifies code between Generals and Zero Hour labels Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gen Relates to Generals Unify Unifies code between Generals and Zero Hour ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants