BunnymodXT icon indicating copy to clipboard operation
BunnymodXT copied to clipboard

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

Open SmileyAG opened this issue 2 years ago • 1 comments

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 avatar Jan 07 '24 17:01 SmileyAG

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.

YaLTeR avatar Jan 08 '24 05:01 YaLTeR