Skip to content

Fix #5225: Apply ped alpha to the jetpack clump - #5226

Open
x6c85 wants to merge 3 commits into
multitheftauto:masterfrom
x6c85:fix/5225-ped-jetpack-alpha
Open

Fix #5225: Apply ped alpha to the jetpack clump#5226
x6c85 wants to merge 3 commits into
multitheftauto:masterfrom
x6c85:fix/5225-ped-jetpack-alpha

Conversation

@x6c85

@x6c85 x6c85 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

CTaskSimpleJetPack::RenderJetPack draws the jetpack from its own clump, so setPedAlpha / me.alpha never reached it. The existing RenderJetPack hook now copies the ped clump alpha onto the jetpack materials, and skips render, thruster FX and engine sound when the ped is fully hidden (alpha 0 or a different interior).

Motivation

Fixes #5225. Getting a jetpack and running crun me.alpha = 0 hid the ped but left a floating pack.

Test plan

  1. Give yourself a jetpack, then crun me.alpha = 0: ped, jetpack, thrusters and jetpack sound should all disappear.
  2. crun me.alpha = 128: ped and jetpack should both be translucent.
  3. crun me.alpha = 255: ped and jetpack should be fully visible again, sound restored.
  4. Change interior while on a jetpack: pack should still hide/show with the ped as before.

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

CTaskSimpleJetPack::RenderJetPack draws from its own clump, so setPedAlpha never reached the pack. Copy the ped clump alpha onto the jetpack and skip render/FX/sound when the ped is fully hidden.
@FileEX

FileEX commented Aug 21, 2026

Copy link
Copy Markdown
Member

Tested, it works. Do you think you could also adjust the alpha of the FX effect?

ped.alpha = 1
image

@FileEX FileEX added the bugfix Solution to a bug of any kind label Aug 21, 2026
FxSystem has no colour alpha, so thruster spawn rate is scaled by ped
alpha and thrusters are respawned on alpha changes to drop leftover
full-bright particles (e.g. me.alpha = 1).
@x6c85

x6c85 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Good catch, FX has no colour alpha, so the pack materials were translucent while the flames stayed full-bright.

Pushed a follow-up that scales thruster spawn rate by ped alpha and clears leftover particles when alpha changes (e.g. me.alpha = 1). Worth another look with the same test.

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

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing a ped's alpha does not change the alpha of their jetpack

2 participants