View Single Post
Author Message
xerox8521
Senior Member
Join Date: Sep 2011
Old 08-05-2022 , 08:29   Dhooks passing int reference to detour
Reply With Quote #1

Hi,

It seems to me you cannot pass argument types to functions with dhooks that are passed by reference unless they are virtual.
Well problem is this function CServerGameClients::GetPlayerLimits I wouldn't know how to make this one virtual as you need to pass an instance of CServerGameClients which you don't have in the normal API.
So i set this up as detour but with this commit here I cannot tell dhooks that the parameters are to be passed as reference. If I just specify them as int I obviously just get garbage.

So what would be the right approach to do this?
xerox8521 is offline