multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.38k stars 425 forks source link

engineRequestModel returns the texture names/elements of its parent ID when requested #2630

Open MrSol0 opened 2 years ago

MrSol0 commented 2 years ago

Describe the bug

This bug relates to getting textures of a model generated by engineRequestModel, the issue is that engineGetVisibleTextureNames & engineGetModelTextures & engineGetModelTextureNames return textures of the ParentID of the model instead of the model itself.

Steps to reproduce

1- engineRequestModel with model id for example 579 2- get a new vehicle mod and replace the id generated from step 1, for example if you get model id 3 then engineLoadDFF & engineLoadTXD model 3 with any mod available online. 3- use for example engineGetModelTextureNames("3") 4- you will get textures of parent vehicle model 579 instead of the mod you replaced on model 3.

Version

No response

Additional context

No response

Relevant log output

No response

Security Policy

Lpsd commented 2 years ago

engineGetModelTextureNames / engineGetModelTextures grabs the textures from original SA models only.

There is no support in those functions for custom model textures. So it's not a bug, but rather functionality which hasn't been implemented and isn't supposed to work in the first place (that's how it's coded). Those functions existed way before engineRequestModel.

So this is technically a feature request, not an bug / issue report. Just for clarification :)

MrSol0 commented 2 years ago

engineGetModelTextureNames / engineGetModelTextures grabs the textures from original SA models only.

There is no support in those functions for custom model textures. So it's not a bug, but rather functionality which hasn't been implemented and isn't supposed to work in the first place (that's how it's coded). Those functions existed way before engineRequestModel.

So this is technically a feature request, not an bug / issue report. Just for clarification :)

Just for clarification it returns false information so it's techinically a bug, also if you replace for example a sultan with a ferrari, engineGetModelTextureNames will return the ferrari textures if the vehicle model ID is not custom not the original SA model textures as you stated.

Lpsd commented 2 years ago

Those functions were written before custom model / texture stuff as above, I'm talking on a technical level for other people investigating this issue in the code so they don't get the wrong idea. This point isn't to be argued.

Fernando-A-Rocha commented 1 year ago

Hey @TheNormalnij I recently experimented with this and it's still a problem. Are you aware of this issue that I think you tried to avoid when you implemented engineRequestModel features?

TheNormalnij commented 1 year ago

@Fernando-A-Rocha Hi! Yes. engineRequestModel was MVP only with main functionality