Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CTestEntity : CBaseEntity
- {
- CHookHandle m_ThinkHook;
- void Think()
- {
- cout << "Think\n";
- }
- public:
- CTestEntity()
- {
- m_ThinkHook = hooks.Think.Register(std::bind(CTestEntity::Think, this));
- }
- }
- // defined as
- class hooks
- {
- static CHook<void(void)> Think;
- }
- // called as
- void GameThink()
- {
- hooks.Think();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement