Skip to content

Fix streamer bug where objects can constantly stream in and out#4744

Merged
Dutchman101 merged 3 commits intomultitheftauto:masterfrom
ArranTuna:streamerbug
Apr 7, 2026
Merged

Fix streamer bug where objects can constantly stream in and out#4744
Dutchman101 merged 3 commits intomultitheftauto:masterfrom
ArranTuna:streamerbug

Conversation

@ArranTuna
Copy link
Copy Markdown
Collaborator

Summary

Fixes #4743

Worked with codex to develop a fix for this bug, first it added "Avoid swap ping-pong when two candidates are almost the same distance" but that wasn't enough to fix it on it's own, so a last stream out time was added.

Motivation

A very old MTA bug that can cause FPS instability when a player is affected by it.

Test plan

Was a little hard to test this, but could reproduce the bug in under 1 minute, by constantly moving slightly with freecam. However after adding the fix I could not reproduce it when testing for at least 5 minutes and observed no other issues.

Checklist

Made sure to comply with the coding guidelines such as using std::uint32_t

@ArranTuna ArranTuna requested a review from a team as a code owner March 6, 2026 20:28
@ArranTuna ArranTuna added the bugfix Solution to a bug of any kind label Mar 10, 2026
@FileEX
Copy link
Copy Markdown
Member

FileEX commented Apr 5, 2026

I don't think this is the right solution. We should fix the root cause of the issue instead of just limiting the time between streaming in and streaming out.

@ArranTuna
Copy link
Copy Markdown
Collaborator Author

I know it's not a perfect fix but the root cause is that the 2 objects are virtually identical in distance so the tiny frame by frame changes in position and camera rotation are causing it to switch back and forth, I don't know how else that could be fixed.

@Dutchman101 Dutchman101 merged commit 9d27fbb into multitheftauto:master Apr 7, 2026
8 checks passed
Dutchman101 pushed a commit that referenced this pull request Apr 7, 2026
#### Summary
Fixes #4743

#### Motivation
A very old MTA bug that can cause FPS instability when a player is
affected by it.
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.

Streamer bug where an object will constantly stream in / out

3 participants