Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem importing Map with Menyoo (LODDIST) #273

Open
AprendizFivem opened this issue Nov 3, 2024 · 0 comments
Open

Problem importing Map with Menyoo (LODDIST) #273

AprendizFivem opened this issue Nov 3, 2024 · 0 comments

Comments

@AprendizFivem
Copy link

AprendizFivem commented Nov 3, 2024

Some maps (such as https://www.gta5-mods.com/maps/ancient-egypt) are not possible to be viewed through CodeWalker.
This happens because some objects have a very high LOD DIST, something like 16960 for some objects, this causes CodeWalker to define LODDIST as -1 in the generated YMAP (This is done for any LODDIST value greater than 10000 when importing a Mennyo map).

ProjectForm.cs
cent.lodDist = (placement.LodDistance < 10000) ? placement.LodDistance : -1;

Apparently LodDist in the game is an integer from 0 to 0xFFFF (uint16_t), if this number accepted 2's complement, the value -1 would be the default (0xFFFF). However, this apparently is not the case. Since loddist does not use 2's complement, the highest value would be 65535.

NOTE: If you change the "loddistance" of the YMAP items (ancient-egypt ) generated to 16960, you will see that everything works normally.

@AprendizFivem AprendizFivem changed the title Problem importing Map with Mennyo (LODDIST) Problem importing Map with Menyoo (LODDIST) Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant