ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.74k stars 629 forks source link

[HL25] Some functions are now inlined #3845

Open DarthMan opened 1 month ago

DarthMan commented 1 month ago

Hello again,

After the anniversary update, some functions were inlined on HL, TFC and probably CS. Would it be possible to have the gamedll recompiled without inlining the functions? I wrote some plugins where I hook certain functions, such as CFuncTank::StartControl , CFuncTank::StopControl, InstallGameRules etc. And now that those functions are inlined, they do not appear in IDA/Ghidra/etc , making it impossible to create unique signatures to hook them. For example, in my mapmanager nextmap plugin, I get the g_pGameRules pointer by getting the return value from InstallGameRules to then hook CHalfLifeMultiplay::ChangeLevel, in order to modify to which map the server will change, in maps such as dustbowl on TFC, where after you capture red's base the score hud is displayed and the server changes the map to the next one present in the mapcycle file. Instead of doing that, I set my own rules to change to what the server decided that the next map will be, either a random map that isn't one of the last played maps, or a mapvote map if one is setup. This can also cause issues with plugins from AlliedModders that rely on the Orpheu module for functions that are otherwise impossible to call or hook. Unfortunately, this is also what prevents me and other people to upgrade the server(s) to the new anniversary builds.

Thanks :)