Skip to content

Conversation

@W3lac3
Copy link
Contributor

@W3lac3 W3lac3 commented Sep 4, 2025

Sometimes when requesting a clothing model, the game would crash due to an infinite loop. This PR solves this problem. The system was functioning normally, but this error could eventually occur. After receiving reports, I reviewed the code and noticed an incorrect use of static that had gone unnoticed.

I recorded a short video demonstrating a system I made using this new feature. Watch the video below:

Grand.Theft.Auto.San.Andreas.2025.09.04.-.11.46.47.07.mp4

Updated the condition for initializing blockOffsetToFileIdMap and blockOffsetToFileNameMap to also trigger when ms_ClothesFileDataMap is not empty, ensuring proper map setup when clothes data is present.
@PlatinMTA
Copy link
Contributor

Ok so this might be what I was experiencing while testing (mouse became extremely laggy after allocating, game froze and crashed without dump), right?

@Fernando-A-Rocha
Copy link
Contributor

Just a note of appreciation: it's really cool to finally see the CJ skin changing body and clothing models... a much awaited feature 😜

@botder botder merged commit e6a85b9 into multitheftauto:master Sep 5, 2025
8 checks passed
@botder botder added this to the 1.7.1 milestone Sep 5, 2025
@botder botder added the bugfix Solution to a bug of any kind label Sep 5, 2025
MTABot pushed a commit that referenced this pull request Sep 5, 2025
e6a85b9 Fix crash when requesting CJ clothing model (PR #4419)
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.

4 participants