Quote:
|
Originally Posted by XxAvalanchexX
Even that doesn't work, even though there is no real reason why it shouldn't. Unfortunately there is no real way to tell when an entity is used.
|
pfnUse is a member of the DLL_FUNCTIONS structure. This means that the engine can call pfnUse in the game DLL. But why on earth should the engine decide when an object uses an other one? That logic should be kept in the game dll. As I said several times, I think that this callback comes from older SDK versions where the engine still used to decide when an object is being used. In the latest HLSdk, use is handled in the DispatchUse function in cbase.cpp and in the CBasePlayer:

layerUse function in player.cpp. I suspect that DispatchUse is never called (okay, it is called from plugins, but it's never called by the engine); the logic is done in CBasePlayer:

layerUse these days.
EDIT: Or maybe they provide it for bots.
__________________