gps: Add client-side calculation as an option#730
Draft
T-MaxWiese-T wants to merge 47 commits into
Draft
Conversation
…ed for teams The reason for this pull request is because the resource did not work the way I wanted it to. Only after I had a closer look at the code I realized that you can configure the resource in the meta.xml. Because I wanted the playerblips resource to take over the team colors that I have in my code, but that didn't happen. And since the server log said to activate the playercolors resource, I did it, but it didn't help. Only after I deactivated the playercolors resource and set "use_team_colors" to "true" did it work as expected. Anyway, the playercolors resource only makes sense if you want to have random player nametag colors, which makes no sense for a team, since a team can only have one color.
…splayed although it was not true and displayed on every player spawn
…ed and unnecessary assignment removed
…ng the previous points at different paths, not all drawn lines of the client HUD mini map were removed
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.
The resource now utilizes a JSON-based node database for lightning-fast pathfinding computations, significantly reducing server CPU load and memory usage.
A server-side configuration toggle has also been introduced, allowing server owners to decide whether pathfinding calculations should happen on the client or the server.
1. Database & Performance Optimization$\sim1\text{--}3\text{ ms}$ ) Dijkstra calculations.
Replaced bulky Lua tables with
vehiclenodes.json: Streamlined database loading, drastically reducing server startup freezes and RAM consumption. Client-Side Pathfinding Capability: The client now loads the JSON database directly into RAM upon joining, allowing for instant (2. Server Configuration & Security
Added a *routeMode setting to meta.xml ("client" or "server"), manageable via the Admin Panel.
Implemented strict server-side validation to reject and log unauthorized triggerServerEvent requests from malicious clients when the resource is set to client-side mode (anti-cheat/anti-spam protection).