Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to completely remove or disable unused functions. #3774

Open
1 task done
Daniheee opened this issue Oct 7, 2024 · 6 comments
Open
1 task done

Add the ability to completely remove or disable unused functions. #3774

Daniheee opened this issue Oct 7, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@Daniheee
Copy link

Daniheee commented Oct 7, 2024

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

A new line could be added to the 'mtaserver.conf' file, something like:

<disabled_functions>setElementInterior, createVehicle<disabled_functions>

Here, we could list functions that our gamemode doesn't use at all, allowing us to completely remove them from both the server and client side.

Describe alternatives you've considered

You can always do:

setElementInterior = nil

But I believe that's not a permanent solution, and it might be possible to ""bypass"" it.

Additional context

Removing unnecessary functions might free up a very small amount of memory as well, though I'm not entirely sure about this, please feel free to correct me on this one.

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.
@Daniheee Daniheee added the enhancement New feature or request label Oct 7, 2024
@TracerDS
Copy link
Contributor

TracerDS commented Oct 7, 2024

You cant prevent client from using these functions. Disabling them on server also doesnt make much sense unless you have third party resources that you didnt write.
You can already disable functions with addDebugHook though that is not an optimal solution.

@Daniheee
Copy link
Author

Daniheee commented Oct 7, 2024

Just as you said, addDebugHook isn’t an optimal solution, it hits performance hard most of the time, and i would prefer not to use it. I would love to remove them simply because i don't use them a single time, ever, so they are completely useless for the server. But it's okay if my idea isn't isn't possible or worth trying

@tederis
Copy link
Member

tederis commented Oct 7, 2024

I don't see the practical side of it.

@Daniheee
Copy link
Author

Daniheee commented Oct 7, 2024

I can understand it's nothing practical, it's more likely a matter of personal preference, nothing serious

@CrosRoad95
Copy link
Contributor

Just do clientside setFarClipDistance(getFarClipDistance() - 0.01) to same same amount of memory you would otherwise save by not including few functions xD

@Daniheee
Copy link
Author

Daniheee commented Oct 7, 2024

Just do clientside setFarClipDistance(getFarClipDistance() - 0.01) to same same amount of memory you would otherwise save by not including few functions xD

haha, thanks for clarifying it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants