Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Sep 17, 2025

This change fixes the initial shadow states of draw modules.

the model shadows in drawables are not correctly initialized: Even if a Drawable, such as the build placement preview object, is created without shadows, it will draw shadows.

The constructor of W3DModelDraw sets m_shadowEnabled = TRUE and ignores the DRAWABLE_STATUS_SHADOWS of the owning Drawable object. Pretty much all objects got initialized without shadows, but have shadows enabled on the first update during game start.

Accordingly, I streamlined the implementation and made the shadow initialization consistent. Drawables no longer start with visible shadows when not given the DRAWABLE_STATUS_SHADOWS flag on construction.

User facing nothing should change.

TODO

  • Replicate in Generals

@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Rendering Is Rendering related Fix Is fixing something, but is not user facing Gen Relates to Generals ZH Relates to Zero Hour labels Sep 17, 2025
@xezon xezon force-pushed the xezon/fix-drawable-shadows-2 branch from 8169fe5 to c06d7a1 Compare September 20, 2025 17:48
@xezon
Copy link
Author

xezon commented Sep 20, 2025

Replicated in Generals without meaningful conflicts.

@xezon xezon merged commit c0f8b79 into TheSuperHackers:main Sep 20, 2025
18 checks passed
@xezon xezon deleted the xezon/fix-drawable-shadows-2 branch September 20, 2025 18:06
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix Is fixing something, but is not user facing Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker Rendering Is Rendering related ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants