Skip to content

gps: Add client-side calculation as an option#730

Draft
T-MaxWiese-T wants to merge 47 commits into
multitheftauto:masterfrom
T-MaxWiese-T:gps
Draft

gps: Add client-side calculation as an option#730
T-MaxWiese-T wants to merge 47 commits into
multitheftauto:masterfrom
T-MaxWiese-T:gps

Conversation

@T-MaxWiese-T

@T-MaxWiese-T T-MaxWiese-T commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

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
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 ($\sim1\text{--}3\text{ ms}$) Dijkstra calculations.

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).

T-MaxWiese-T and others added 30 commits April 30, 2024 03:40
…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
…ng the previous points at different paths, not all drawn lines of the client HUD mini map were removed
@T-MaxWiese-T T-MaxWiese-T changed the title Gps gps: Add client-side calculation as an option Jun 27, 2026
@T-MaxWiese-T T-MaxWiese-T marked this pull request as draft June 28, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants