Skip to content

Fix p-spew with homing weapons#6875

Merged
wookieejedi merged 1 commit into
scp-fs2open:masterfrom
wookieejedi:fix-homing-pspew
Jul 28, 2025
Merged

Fix p-spew with homing weapons#6875
wookieejedi merged 1 commit into
scp-fs2open:masterfrom
wookieejedi:fix-homing-pspew

Conversation

@wookieejedi

Copy link
Copy Markdown
Member

#6808 converted all Pspews to use the new particle effects, though that in turn lead to a fun little visual bug. Overall, particles on weapons will only be rendered if they are valid, and the is valid check included a weapon_state == m_weaponstate check (IE states had to match between what the weapon object held and what the particle held. When a weapon switches to homing that particle state was never updated, b/c before 6808 it never needed to be. This lead to the particle effects from pspews not rendering when a missile was in homing mode.

This PR fixes that issue by also updating the particle host status whenever the weapon state changes (uses the same logic as when the particle spawns the first time).

Tested and works as expected.

scp-fs2open#6808 converted all Pspews to use the new particle effects, though that in turn lead to a fun little visual bug. Overall, particles on weapons will only be rendered if they are valid, and the is valid check included a `weapon_state == m_weaponstate` check (IE states had to match between what the weapon object held and what the particle held. When a weapon switches to homing that particle state was never updated, b/c before 6808 it never needed to be. This lead to the particle effects from pspews not rendering when a missile was in homing mode.

This PR fixes that issue by also updating the particle host status whenever the weapon state changes (uses the same logic as when the particle spawns the first time).

Tested and works as expected.
@wookieejedi wookieejedi added this to the Release 25.0 milestone Jul 28, 2025
@wookieejedi wookieejedi added fix A fix for bugs, not-a-bugs, and/or regressions. particles An item related to the particle system labels Jul 28, 2025
@wookieejedi wookieejedi enabled auto-merge (squash) July 28, 2025 22:07
@wookieejedi wookieejedi merged commit 7a655e4 into scp-fs2open:master Jul 28, 2025
20 checks passed
@wookieejedi wookieejedi deleted the fix-homing-pspew branch August 7, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A fix for bugs, not-a-bugs, and/or regressions. particles An item related to the particle system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants