Make textdraw pool limits runtime configurable - #1250
Conversation
|
rare neufox W |
| const int globalLimit = configuredGlobalLimit ? *configuredGlobalLimit : GLOBAL_TEXTDRAW_POOL_SIZE; | ||
| const int playerLimit = configuredPlayerLimit ? *configuredPlayerLimit : PLAYER_TEXTDRAW_POOL_SIZE; | ||
| const long long totalLimit = static_cast<long long>(globalLimit) + static_cast<long long>(playerLimit); | ||
| if (globalLimit < 0 || playerLimit < 0 || totalLimit > INVALID_TEXTDRAW) |
There was a problem hiding this comment.
INVALID_TEXTDRAW is 0xFFFF (65535), max textdraws should be 2304 (global + player). You should fix the totalLimit > INVALID_TEXTDRAW check.
There was a problem hiding this comment.
What about custom launchers that allow more?
I tested a patched samp.dll and the game can go above the 2304 limit just fine
There was a problem hiding this comment.
What about custom launchers that allow more?
I tested a patched samp.dll and the game can go above the 2304 limit just fine
That's a fair point, but IIRC the maintainers still don't support configuration for custom launchers.
I think there were PRs/suggestions to allow customizing max vehicle models, weapons, or something similar... Maybe @AmyrAhmady can confirm.
Kept the SDK defaults unchanged. Nothing changes unless the user explicitly sets:
Legacy server.cfg options are also supported:
Custom limits are reported during startup. If an invalid value is provided, the default is used instead.