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.42k stars 438 forks source link

engineImportTXD() persists through servers #1877

Open PlatinMTA opened 4 years ago

PlatinMTA commented 4 years ago

Describe the bug This is a well known bug (or at least it should be because it exists since forever). Changing just the texture of a model via engineImportTXD() (like the popular zday resource does) will make the change persistent even if you connect to another server. This fixes itself after restarting the game.

To reproduce

  1. Have two servers, one with Zday resource.
  2. Load Zday resource, then join that server.
  3. Quit that server and join the one without the Zday resource.
  4. Change to any zombie skin, like 280
  5. You should see that the model 280 is still with the TXD from Zday, even when that server doesn't have it.

Expected behaviour The texture should be back to normal after disconnecting from a server.

Version Since forever (or at least 1.4)

Additional context This could have a potential bigger side effect apart from having the textures loaded in the wrong server, because its probably related to a memory leak and maybe it also persists when changing DFF's, COL's and TXD's at the same time, but it's shown in game because the name of the textures does not match.

I just have seen this with peds and vehicles, but probably it works with objects too. Stopping the resource before disconnecting seems to solve the issue, so maybe someone forgot to revert the changes made when you disconnect from a server.

forkerer commented 4 years ago

I can confirm that there is txd issue like that, playing on some servers caused some textures to become corrupted (white) on our server and vice-versa. There's also some other handling related issue that can break handlings on other server, but we never pinpointed exactly how to reproduce it

Dutchman101 commented 4 years ago

I reproduced it, but it's inconsistent (one time the bug occurs, and other time it doesn't).

This was the second attempt, during which I managed to reproduce: https://www.youtube.com/watch?v=O5EPryW25aU

Never expected something as basic as this to be true.. are you 100% sure it goes all the way back to MTA 1.4?

forkerer commented 4 years ago

Happens at least for 3+ years on our server @Dutchman101

PlatinMTA commented 4 years ago

Never expected something as basic as this to be true.. are you 100% sure it goes all the way back to MTA 1.4?

I had a Zombie server way back in 2014 and I can recall this happening. I never thought about reporting it because I got used to it, kinda dumb but yeah.