Closed Fernando-A-Rocha closed 3 years ago
How to reproduce bug:
I had the same issue when working on my own model streamer. I fixed it by detecting the recursion directly. You see, you can expect the streamer to stream-out the element in the way you detected it, all the time. That was the "fix" for me at scene2res.
I had the same issue when working on my own model streamer. I fixed it by detecting the recursion directly. You see, you can expect the streamer to stream-out the element in the way you detected it, all the time. That was the "fix" for me at scene2res.
Interesting! But don't you believe we could get to the root of the problem in MTA code and prevent it from happening? Or is there a reason this happens?
I went ahead and implemented a simple solution to detect the recursion and prevent it as you said @quiret ^^
Reopening issue because I think we need to discuss why this bug happens and if there an actual way to fix it within MTA code?
Technically the stream-out is related to the destruction of the real game entity. You can fix it by doing a manual model, texture and collision update on the entity. I am not sure about all the game variables that need adjustment, especially since there could be hooks all over the place and dependent MTA hacks, but it should be possible. But do you really want to mess with the buggy game logic any further and risk evoking more bugs in MTA?
Thank you for making it clearer @quiret ! I guess this temp fix will be fine for now...
Explained here: testing script line 71 (where it says NOT OK)
The added
unittest_newmodels
resource is for stress-testing everything and trying to find issues like this one :) Special thanks to @httpRick for helping out