Raised This Month: $168 Target: $400
 42% 

SourceHook - Possible to hook the same member object multiple times?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-04-2011 , 17:20   SourceHook - Possible to hook the same member object multiple times?
Reply With Quote #1

Background:
I have SH_ADD_HOOK in a method that used to be only called once.

However, in newer versions of my extension, it is now possible to call this function multiple times. Will I be hooking the same event multiple times, or will it just ignore multiple identical hooks on the same object?
__________________
So long and thanks for all the fish.
Powerlord is offline
pimpinjuice
Veteran Member
Join Date: May 2006
Old 12-13-2011 , 15:37   Re: SourceHook - Possible to hook the same member object multiple times?
Reply With Quote #2

I feel like there would be a new hook every time. One of the nice things about SourceHook is the ability to chain virtual table hooks. I feel like much of that is lost if there is a limitation on hooks per member per plugin.

EDIT: That being said, I'm sure it would be as simple as maintaining a boolean to prevent duplicate hooks on specific members.
__________________

Last edited by pimpinjuice; 12-13-2011 at 15:38.
pimpinjuice is offline
Send a message via AIM to pimpinjuice
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:53.


Powered by vBulletin®
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Theme made by Freecode