Skip to content

Server Model Allocation (Part 1): Refactor entity datasets and handlings into external configs - #5232

Open
MohabCodeX wants to merge 1 commit into
multitheftauto:masterfrom
MohabCodeX:refactor/server-data-configs
Open

Server Model Allocation (Part 1): Refactor entity datasets and handlings into external configs#5232
MohabCodeX wants to merge 1 commit into
multitheftauto:masterfrom
MohabCodeX:refactor/server-data-configs

Conversation

@MohabCodeX

@MohabCodeX MohabCodeX commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Moves hardcoded server entity data and vehicle handlings from C++ into separate .conf files.

This is Part 1 of adding custom model allocation to the server. Follow-up PRs will add the model manager, dynamic ID allocation, and server-side Lua functions.

Note on diff size: The large line count is only because objects.conf contains 14,000 lines of object IDs, and we deleted 7,500 lines of hardcoded handling arrays from CHandlingManager.cpp. The actual C++ code changes are very small (~350 lines).

Changes

  • Added config files in mods/deathmatch/:
    • objects.conf (14,339 lines)
    • peds.conf (299 lines)
    • vehicles.conf (214 lines)
    • handling.conf (213 lines)
  • Added loader classes for handling, vehicles, objects, and peds.
  • Removed 7,554 lines of hardcoded handling data from CHandlingManager.cpp.

Next Steps

  • Part 1 (This PR): Config files and loaders.
  • Part 2: Server CModelManager and dynamic ID allocation.
  • Part 3: Server-side Lua functions.
  • Part 4: Sync and packet updates.

Test Plan

  1. Start the server.
  2. Run via runcode:
    srun h = getOriginalHandling(411); outputChatBox("Infernus Mass: " .. tostring(h.mass))

…l Allocation Part 1)

- Move hardcoded handling array to handling.conf
- Add objects.conf, peds.conf, and vehicles.conf
- Add config loader classes for handling, vehicles, objects, and peds
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.

1 participant