Ability to launch a secondary client#4574
Open
Xenius97 wants to merge 44 commits intomultitheftauto:masterfrom
Open
Ability to launch a secondary client#4574Xenius97 wants to merge 44 commits intomultitheftauto:masterfrom
Xenius97 wants to merge 44 commits intomultitheftauto:masterfrom
Conversation
Member
Contributor
Author
|
Yes i saw but that looks unfinished or idk whats with that now. Isn't merged, has no update since june. |
|
How about running an unlimited number of clients? Or maybe up to 5-10? |
Contributor
Author
I think it’s doable if we completely scrap this whole “mutex” and “GUID” thing. Although for such a step, feedback from the MTA leadership would also be necessary. |
qaisjp
reviewed
Jan 24, 2026
qaisjp
reviewed
Jan 24, 2026
qaisjp
reviewed
Jan 24, 2026
qaisjp
reviewed
Jan 25, 2026
Xenius97
commented
Jan 25, 2026
Refactor isolated TXD system from shared-per-parent to per-model slots. Previously, clones sharing a parent TXD would share one isolated TXD slot, causing texture replacements to mix between models with same-named textures. - Each model now gets its own isolated TXD slot via g_IsolatedTxdByModel - Add TXD pool exhaustion protection (95% hard limit, reserved slots) - Add deferred replacement queue for when isolation is temporarily denied - Add safer streaming info access with bounds checking - Improve orphan TXD cleanup with bounded iter
Fix texture mixing bug where replacements applied during TXD reapply went around isolation checks, causing textures to be applied to shared parent TXDs instead of per-model isolated TXDs. The reapply now verifies: - Isolation entry exists for the model - Model's current TXD matches the isolated TXD Also adds auto-reclamation of unused isolated TXD slots to reduce pool pressure: - Reclaims slots unused for 30+ seconds when pool usage >= 80% - Leveled timeouts (30s/15s/10s) and batch sizes based on pressure level - Validates parent TXD is loaded before reverting model
Build Tools 2022: 17.14.36915.13 Build Tools 2026: 18.2.11415.280 This is an automated commit to keep track of toolchain changes on the build server. It applies to every MTA build after this commit until further notice. [skip ci]
Reduce overhead when models are filtered out early by the TXD ID check
…on): Cache per-TXD-slot texture name lookups to avoid repeated iteration of RwTexDictionary linked lists. Parent TXDs benefit most as they're accessed by multiple model clones during pending isolation processing. Cache design: - Keyed by TXD slot ID with TXD pointer validation - Auto-invalidates on streaming reload (pointer mismatch) - Explicit invalidation on texture add/remove operations Invalidation points (7 total): - Session reset (clear all) - TXD slot removal in orphan cleanup - Old isolated TXD replacement - After ModelInfoTXDAddTextures completes - After ModelInfoTXDRemoveTextures completes - Isolated model cleanup - SafeOrphanTexture after texture removal Frequently called paths updated to use cached lookups: - ProcessPendingIsolatedModels (parent + child TXD) - GetModelTexturesInfo stale handling - TryApplyPendingReplacements - CleanupIsolatedTxdForModel
Build Tools 2022: 17.14.36915.13 Build Tools 2026: 18.2.11415.280 This is an automated commit to keep track of toolchain changes on the build server. It applies to every MTA build after this commit until further notice. [skip ci]
Build Tools 2022: 17.14.36915.13 Build Tools 2026: 18.2.11415.280 This is an automated commit to keep track of toolchain changes on the build server. It applies to every MTA build after this commit until further notice. [skip ci]
…asa-blue into new/secondary_client
This reverts commit 0b4f43b.
This reverts commit 3635d1e.
This reverts commit d09d873.
This reverts commit 1569aab.
…condary client support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3970, #3860
This PR allows you to launch a secondary client. Similar to FiveM, it can be accessed using the “-cl2” command line argument.
The secondary client uses its own configuration files and resource cache, avoiding any conflicts. Your serial remains the same, nothing changes there.
To use it, you need to disable the double-serial check in mtaserver.conf.
From a development perspective, if you have two monitors, it can be extremely helpful to test things like synchronization even before potentially publishing a script.
You can also be in two places at the same time, which is an advantage when working with multiple servers.
I hope this feature can be included, and that MTA server developers will be able to make use of the potential it offers.
Please let me know if you have any requests or ideas related to the change, and I’ll do my best to accommodate them.