Skip to content

Fix engineImageLink not applying to weapon models - #5146

Merged
FileEX merged 1 commit into
multitheftauto:masterfrom
TheCrazy17:fix/issue-5145-engineimagelink-weapons
Aug 4, 2026
Merged

Fix engineImageLink not applying to weapon models#5146
FileEX merged 1 commit into
multitheftauto:masterfrom
TheCrazy17:fix/issue-5145-engineimagelink-weapons

Conversation

@TheCrazy17

Copy link
Copy Markdown
Contributor

Summary

CClientIMG::LinkModel now restreams weapon models the same way it already does for vehicle models.

mta-screen_2026-08-03_13-52-50

Motivation

Resolves #5145.

engineImageLinkDFF/engineImageLinkTXD link a new model through CClientIMG::LinkModel, which already restreams vehicle models so they pick up the new one. Weapon models were missing that call, so a weapon a ped was already holding kept its old RW clump and only picked up the replacement once something else happened to restream it. CClientDFF, CClientTXD and CClientGame already call CClientPedManager::RestreamWeapon for the same case, so CClientIMG now does the same.

Test plan

imgweapon.zip

With a ped already holding a M4, linking a replacement dff for model 356 now swaps the held weapon model.

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.

@Xenius97

Xenius97 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Wow, that was fast. Thanks!

@FileEX FileEX added the bugfix Solution to a bug of any kind label Aug 4, 2026
@FileEX FileEX added this to the 1.7 (Current) milestone Aug 4, 2026
@FileEX
FileEX merged commit 6adbd9e into multitheftauto:master Aug 4, 2026
10 checks passed
@TheCrazy17
TheCrazy17 deleted the fix/issue-5145-engineimagelink-weapons branch August 5, 2026 10:50
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.

engineImageLink* doesn't work with weapon models

3 participants