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

[Windows] Use a virtual tables as a fallback for look up functions from some classes #488

Open
SmileyAG opened this issue Jan 7, 2024 · 1 comment

Comments

@SmileyAG
Copy link
Collaborator

SmileyAG commented Jan 7, 2024

This solution is controversial, but I said in first that it exactly should be used only as a fallback option, and maybe there even should environment variable to disable it in case

Good and useful example to use it can be the functions from CStudioModelRenderer class: if we say at least one found function from this class, then we can try to find the rest functions based on the table from HLSDK code (only in case if those functions wasn't found before by patterns): https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/cl_dll/StudioModelRenderer.h#L25-L99

Of course, this does not guarantee that we will find what we need, but let me ask you, how often modders would inserting sticks into our bicycle by adding new functions to the middle of the table or removing current ones?

@SmileyAG SmileyAG changed the title Use a virtual tables as a fallback for look up functions of some classes Use a virtual tables as a fallback for look up functions from some classes Jan 7, 2024
@YaLTeR
Copy link
Owner

YaLTeR commented Jan 8, 2024

how often modders would inserting sticks into our bicycle by adding new functions to the middle of the table or removing current ones?

I mean, if you're making a mod then it doesn't matter where you put a new function, so people might just do it without thinking. And a non-working feature is better than crashing in case a wrong function is found.

@SmileyAG SmileyAG changed the title Use a virtual tables as a fallback for look up functions from some classes [Windows] Use a virtual tables as a fallback for look up functions from some classes Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants